让我开始给你我的设置的细节:
我在x86_64的拱门上运行Fedora 13。 我用sshfs挂载了一个远程目录:
jim@localsite $ sshfs jim@remotesite:/home/jim /home/jim/remotemount
现在,如果su为root并尝试读取挂载点下的内容,我会得到:
root@localsite $ ls -l /home/jim/remotemount ls: cannot access remotemount: Permission denied root@localsite $ ls -l /home/jim total 0 drwxrwx---. 1 jim jim 90 Oct 1 12:00 bin drwxrwx---. 1 jim jim 90 Oct 1 12:00 dev d?????????? ? ? ? ? ? remotemount drwxrwx---. 1 jim jim 90 Oct 1 12:00 tmp
看到root无法访问remotemount目录是相当奇怪的。 这是预期的行为? 如果是这样,为什么? 如果不是的话,如何解决这个问题将会有所帮助。 谢谢。
这是devise在保险丝作为安全措施。 在使用sshfs挂载文件系统时,传递-o allow_root
或-o allow_other
选项。
这是为了防止共享系统上的根源。
findls: cannot access system: Permission denied
在mint / ubuntu上的sshfs之后, ls: cannot access system: Permission denied
。
sudo adduser <username> fuse
从文件/etc/fuse.conf中的user_allow_other
中删除。 更改fuse.conf的权限sudo chmod a+r /etc/fuse.conf
现在重启,然后执行
sshfs <login>@<ip_of_machine>:<path_to_mount> <mountpoint> -o allow_other