I use: Emacs 26.1 on Windows 10 with tramp with plink/pscp to edit perl scripts on a remote Linux server
The scripts are executable (permissions 755).
When I load and then save them, if short time has passed, the permissions are preserved. However, when I don't save the buffer for somewhat longer time, it corrupts remote file permissions and set them to 666.
Even after switching off the saving of backups problem persists.
How do I fix that? Are there workarounds?
C-h v make-backup-files
. If the backups are made by renaming, then there's a greater chance of the new file not acquiring the same attributes as the original file, so you might find thatbackup-by-copying
is your answer. – phils Jan 16 '19 at 23:33