setuid root

Tiago Simões Batista baitas at zmail.pt
Thu Aug 24 08:09:26 EDT 2006


Hello all

I have a situation that requires that a python script, that is
run from a webpage (via php exec()) must be run with root privileges.

The sysadmin already set the setuid bit on the script, but it
still fails when it tries to write to any file that only root has
write access to.

I read somewhere that any scripts that start with "#!" will no
honour the setuid bit...

I also tried os.setuid(0), with the setuid bit on, but this call
failed.

I am now out of ideas :(

Any sugestions?

Tiago






More information about the Python-list mailing list