I have the following set-up: I have a disk mounted with sshfs and I am trying to access the files on it from a python script run locally on my machine. The problem is that even though my user doesn't have any rights over a file - i.e.:
-rw------- 1 13912 1313 40 Nov 25 11:04 test_file.txt
(I am not the owner of the file), os.access still returns True:
>> os.access('/path/to/file/test_file.txt', os.R_OK)
>> True
though when I try to open this file, I get a permission denied error - which is the expected behaviour.
>> f=open('/path/to/file/test_file.txt')
>> IOError: [Errno 13] Permission denied: '/path/to/file/test_file.txt'
Can anyone explain me what am I doing wrong or if there is something I am missing regarding os.access? Is it because this file is owned by a user which doesn't exist in my os? () Thanks in advance!