Re: [Python-Dev] os.path.exists() / os.path.isdir() inconsistency when dealing with gvfs directories

2012年6月27日 06:00:03 -0700

Am 27.06.2012 01:49, schrieb Giampaolo Rodolà:
> I've just noticed a strange behavior when dealing with gvfs filesystems:
> 
> giampaolo@ubuntu:~$ python -c "import os;
> print(os.path.exists('/home/giampaolo/.gvfs'))"
> True
> giampaolo@ubuntu:~$ sudo su
> root@ubuntu:~# python -c "import os;
> print(os.path.exists('/home/giampaolo/.gvfs'))"
> False
The issue isn't isolated to GVFS. It's more the current user doesn't
have the exec persmission on the directory entry /home/giampaolo. On
most systems the home directories have either 0700 or 0750.
A user needs the 'x' bit enter or traverse through a directory
(mnemonic: exec -> enter), the 'r' bit to read the content of a
directory (e.g. listdir) and the 'w' bit to write (create or delete
files unless the sticky bit is set).
Christian
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to