How to execute a file with (---x--x--x) Permissions and I am not the owner?

Alexander Skwar listen at alexander.skwar.name
Sun Aug 6 07:03:50 UTC 2006


· Gregory Piñero <gregpinero at gmail.com>:

> It's a python file and I tried running these two commands and get the
> following errors:
> 
> $ python backup_all.py >> log.txt
> python: can't open file
> '/home/chiefinnovator/backups_all_web/backup_all.py': [Errno 13]
> Permission denied
> 
> $ backup_all.py >> log.txt
> python: can't open file
> '/home/chiefinnovator/backups_all_web/backup_all.py': [Errno 13]
> Permission denied
> 
> Since this file has passwords in it, I wanted to make it execute-only.
>  Is that not possible?

Yes, it is possible. But that's a python script and python is an
interpreted language. This means, that the interpreter needs read 
access to the file. It doesn't have this access.

I'd recommend to remove the password from the file and put it
in, say, ~/.backup_all.rc. ~/.backup_all.rc, I'd set to chmod 0400.

Alexander Skwar
-- 
Du hast Erklärungen...  Soviel Fantasie braucht man wohl für W95...
Um sich vorzustellen es wäre ein BS
                -- Soenke Lange






More information about the ubuntu-users mailing list