os.access(file, os.R_OK) on UNIX and WINDOWS
on UNIX I changed the permission of a file "myfile" with chmod 000
myfile. Then I got 0 from os.access(myfile, os.R_OK). This is ok.
Then I checked the same file on WINDOWS (with samba):
I got "True" from os.access(myfile, os.R_OK). I think it is not ok?!
In my python script I check the return value of os.access(myfile,
os.R_OK) and when it is "True" I copy the file with shutil.copy(myfile,
But on WINDOWS I get the error: IOError: [Errno 13] Permission denied.
How can I check the right file access with python on WINDOWS before
copying the file?
Is it a samba configuration?
Thank' for your hints, Kai
|All times are GMT. The time now is 07:15 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.