K
kai rosenthal
Hello,
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,
newfile).
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
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,
newfile).
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