On Wed, Jun 27, 2012 at 01:49:34AM +0200, Giampaolo Rodol? <g.rod...@gmail.com> 
wrote:
> 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
> 
> This is due to os.stat() which internally fails with PermissionError (EACCES).

   BTW, the same is true for FUSE when an FS has been mounted without
something like "-o allow_other" or "-o allow_root":

root@nb # ls /home/phd/mnt/net
ls: cannot access /home/phd/mnt/net: Permission denied

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
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