IOError - cannot create file (linux daemon-invoked script)

Nobody nobody at nowhere.com
Mon Jan 4 10:46:57 EST 2010


On Sun, 03 Jan 2010 13:56:24 -0800, cassiope wrote:

> I'm changing the uid and gid in the daemon (which runs with root
> permissions
> until the fork and uid/gid change).  The uid and gid are confirmed by
> printing os.getuid() and os.getgid() in the script.

Those tell you the *real* UID/GID. Filesystem checks are performed using
the *effective* UID/GID.

You need to set them with seteuid/setegid and check them with
geteuid/getegid.




More information about the Python-list mailing list