当我使用远程文件(通过 SSH/SFTP)时,Emacs 总是使用 700
权限保存文件,但任何其他编辑器(例如 GEdit)保持 之前的权限770
。
有什么方法可以配置 Emacs 使其不更改文件权限?
最佳答案
所以 here's可能有帮助的东西。我链接到的错误几乎描述了你的情况(用 vim 代替 emacs)。那里有人发布了您可以尝试的解决方法:
...after installing sshfs (fuse was already installed), then mounting the remote server by creating /mnt/servername, and using
sshfs user@servername:/path/ /mnt/servername/ -p port
, I was able to use gvfs to navigate to /mnt/servername and open, edit and save the file using GVim without problems. This is both a workaround, and perhaps useful in narrowing down the problem.
当然,最简单(也是最快)的解决方案是使用 Tramp Mode :
C-x C-f /user@10.10.1.10:/var/www/test.php
关于linux - 使用 Emacs 编辑 GVFS 挂载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8977700/