2

When I'm working with remote files (over SSH/SFTP), Emacs always saves the files with permission 700, but any other editor (e.g. GEdit) maintains the previous permission of 770.

Is there any way to configure Emacs such that it does not change the file permissions?

4
  • mh I don't know. I open files via GNOME... I'm newbie with emacs, however this is the message after saving: "Wrote /home/federico/.gvfs/SFTP for federico on 10.10.1.10/var/www/test.php" Gedit and other editor haven't this problem...
    – ocirocir
    Jan 23, 2012 at 19:58
  • Ok I'm not in Tramp mode. I open files via Gnome, and Gnome mount remote dir with GVFS. It is mounted in "/home/user/.gvfs/SFTP for user on 10.10.1.10/" . But I've got this problem only with emacs and only with remote files...
    – ocirocir
    Jan 23, 2012 at 20:18
  • I've deleted my previous comments so as to reduce noise. Can you have a read through what I posted and let me know. Jan 23, 2012 at 20:32
  • I have the same problem with gvfs and GVim Jan 2, 2013 at 9:34

1 Answer 1

4

So here's something that may help. The bug I linked to describes your situation almost to a tee (substituting vim for emacs). Someone there posted a workaround you could try:

...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.

Of course, the easiest (and quickest) solution will be to use Tramp Mode:

C-x C-f /[email protected]:/var/www/test.php
1
  • 2
    That bug is opened from 2008! :( Where are gvfs developers? :D So, Tramp mode is a perfect and simple solution. Thanks :)
    – ocirocir
    Jan 24, 2012 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.