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

Cameron Simpson cs at zip.com.au
Sun Jan 3 19:36:39 EST 2010


On 03Jan2010 15:56, cassiope <fpm at u.washington.edu> wrote:
| Strace confirms the uid and gid == "lesser user".  Changing the
| directory
| permissions to 775 changes nothing.  Clearly get EACCES error on the
| attempted
| file creation.
| 
| The only other thing is that as part of the python interpreter call, I
| provide
| a "reduced environment", just UID,GID,TMP,PWD,USER, and HOME.  Is
| anything
| else needed?

Should be irrelevant.

Ok: does the file to be created already exist? If so, what are its
permissions? If the file exists and isn't writable you may get this
error.

Also, did you eyeball the actual open() call to ensure the file pathname
is correct, and doesn't use a bogus (non-existent) directory name?
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

"GOD IS MY SOURCE"      - Bumper sticker, Chapel Hill, NC
I'll have to remember that one for the next code review meeting.
        - ajvander at ingr.com (Alain van der Heide)



More information about the Python-list mailing list