linux - 使用 Emacs 编辑 GVFS 挂载文件

标签 linux emacs ssh sftp

当我使用远程文件(通过 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/

相关文章:

linux - 如何在不使用引号的情况下删除名为*(星号)的文件?

linux - 如何使用 or 语句查找多种类型的文件?

linux - clang memory sanitizer (linux) 不报错

一行文件末尾的 Emacs 模式行

git - 选择要与 Git 一起使用的私钥

java - 使用 Java 通过 SSH 隧道传输文件

linux - 内核如何将线程与进程分离

emacs - Emacs 框架周围的边框/框架

git - Windows 的 .ssh/config 文件 (git)

emacs - 显示组织模式大纲直至特定标题级别