Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   os.access(file, os.R_OK) on UNIX and WINDOWS (http://www.velocityreviews.com/forums/t370335-os-access-file-os-r_ok-on-unix-and-windows.html)

kai rosenthal 09-13-2006 09:26 AM

os.access(file, os.R_OK) on UNIX and WINDOWS
 
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



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.