gedit + sshfs 无法保存(vi 保存得很好!)

Sla*_*a N 6 permissions gedit sshfs

我使用 安装了一个远程目录sshfs,但无法使用 保存文件gedit,而使用vi作品保存相同的文件。更改权限以o-r (640)允许gedit保存文件 OK。有没有办法更改sshfs连接以在geditchmod删除每个文件的情况下工作?

(我使用 -o uid= id -u-o gid= id -g,这样远程文件似乎归我所有)

$ touch test.txt 
[!] test.txt appears

$ vi test.txt 
[!] :wq -> saves just FINE

$ gedit test.txt 
[!] opens fine, but upon save shows "You do not have the 
[!] permissions necessary to save the file" error - 
[!] CAN'T SAVE

$ vi test.txt 
[!] edit, :wq -> again saves just FINE!

$ ls -l test.txt
-rw-r--r-- ..... test.txt

[!] Now the tricky part:

$ chmod o-r test.txt
-rw-r----- ..... test.txt  <-- removed 'read' perm. from 'others'
$ gedit test.txt 
# WORKS! Saves just fine!
Run Code Online (Sandbox Code Playgroud)

为什么取消他人的读取权限允许gedit保存?(而 vi 和其余的没有那个问题?)

有没有办法更改 sshfs 连接字符串以允许我直接在服务器上编辑所有文件,而无需 chmod 或它们?

Sla*_*a N 5

-o workaround=rename 解决了我的问题


Rob*_*ans 2

-o allow_other可能会为你做点什么...似乎有人在这里遇到了类似的问题:http://ubuntuforums.org/showthread.php ?t=873199


fin*_*ley 1

附加-o allow_other到安装指令的末尾。

[编辑]这是一个已知问题,我在https://bugs.launchpad.net/gedit/+bug/34813找到了错误报告。

还发现您可以通过禁用-> ->Create a backup copy of files before saving中的选项(至少)来解决 gedit 中的错误 。EditPreferencesEditor

该问题(根据 gedit 人员的说法)是 samba/cifs 错误,并于 2006 年首次记录(在 Ubuntu 中)。