我以自己的用户身份使用FUSE文件系统,但没有问题,但是root无法访问我的FUSE挂载。相反,任何命令都给出Permission denied
。如何授予root权限读取这些安装文件?
~/top$ sudo ls -l
total 12
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 bar
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 foo
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory
~/top$ fuse-zip foo.zip foo
~/top$ unionfs-fuse ~/Pictures bar
我的用户yonran可以正常阅读:
~/top$ ls -l
total 8
drwxr-xr-x 1 yonran yonran 4096 2011-07-25 18:12 bar
drwxr-xr-x 2 yonran yonran 0 2011-07-25 18:51 foo
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory
~/top$ ls bar/
Photos
但是root无法读取任何FUSE目录:
~/top$ sudo ls -l
ls: cannot access foo: Permission denied
ls: cannot access bar: Permission denied
total 4
d????????? ? ? ? ? ? bar
d????????? ? ? ? ? ? foo
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory
~/top$ sudo ls bar/
ls: cannot access bar/: Permission denied
我正在运行Ubuntu 10.04:我总是从Canonical安装任何更新。
$ uname -a
Linux mochi 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
编辑:删除了root曾经能够访问挂载的含义。想一想,也许我的脚本从未尝试过以根用户身份访问目录。