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

cassiope fpm at
Mon Jan 4 18:16:52 CET 2010

On Jan 4, 7:46 am, Nobody <nob... at> wrote:
> 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.

To Cameron: the file doesn't (yet) exist; and it has the correct full

To "Nobody" : hey, this seems interesting.  First test, invoking
and setegid() didn't help - but strange thing was these calls didn't
up in the strace, so perhaps I wasn't testing what I thought I was.
have to check this later as people are now back to work and needing
daemon for its other functions...

Thanks for your ideas!  I'll be checking it more later...

More information about the Python-list mailing list