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 /<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0e7b7d6b7c4e3f3e203f3e203f203f3e" rel="noreferrer noopener nofollow">[email protected]</a>:/var/www/test.php

关于linux - 使用 Emacs 编辑 GVFS 挂载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8977700/

相关文章:

与 Windows 平台相比,Linux 中的 CPU 需要花费太多时间来执行嵌套 for 循环

c - XCB : detect change of a window's name/title

emacs - emacs中tex-mode和latex-mode和LaTeX-mode有什么区别

emacs - 如何配置 Emacs 使用可变字体来显示 LaTeX 公式的预览?

linux - 适用于 nginx 的 Windows .crl 到 .pem

Emacs - require-final-newline 本地值覆盖全局值

bash - 使用scala通过ssh远程发出命令的问题

azure - 使用 Cloud shell 通过 SSH 连接到 Azure 上的 Linux VM

git 卡在 ssh 上的推送(破管)上

android - 为windows或linux系统开发远程桌面连接android应用程序