How to execute a file with (---x--x--x) Permissions and I am not the owner?
Scott J. Henson
scotth at csee.wvu.edu
Sun Aug 6 05:22:11 UTC 2006
Gregory PiƱero wrote:
> It's a python file and I tried running these two commands and get the
> following errors:
> Since this file has passwords in it, I wanted to make it execute-only.
> Is that not possible? I also set the owner to root if that matters.
What others have said is correct, the python interpreter
must be able to read the file to execute it. As a way
around this, you might look into pyrex. Its a C to python
layer that allows you to compile programs that look a lot
like python into C programs that are then further compiled
by gcc into machine code. Depending on how complex your
script is you may be able directly run pyrex on it and get
out C that you can compile and have a mode of 111 on and
still execute.
More information about the ubuntu-users
mailing list