[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ownership and permissions of backup files
From: |
Kai Großjohann |
Subject: |
Re: Ownership and permissions of backup files |
Date: |
Fri, 28 Mar 2003 18:29:48 +0100 |
User-agent: |
Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux) |
Glenn Morris <address@hidden> writes:
> I think it's fair that if I tell Emacs to put all backup files in one
> directory, it does so, regardless of the original files being on a
> different machine or having a different owner. But the changing
> ownership of the backup files confuses me.
Note that on SysV systems you aren't allowed to give away files.
This means that the user gmorris has no way to create a file owned by
root.
(And if there was such a way, then you couldn't overwrite the file
later on, because of lack of permissions.)
So if you want the backup file to belong to somebody other than the
user running Emacs, you have to use Tramp for writing the backup file.
> But I can see that it's difficult to know what to do. The user on the
> remote machine might not even exist on the local machine. Or one could
> be su'ing to a user without permission to write to the backup
> directory.
Yes. Basically, one has to use Tramp to write the backup file.
> Maybe Tramp should temporarily set backup-directory-alist to nil at
> the appropriate point for a Tramp file?
>
> Or maybe there should just be a comment in the Tramp manual that people
> using backup-directory-alist should bear in mind that there might be
> some effects, and they might need to adapt the value accordingly?
Yes, I think it is best to include such a comment. [time passes]
Done in CVS. WDYT?
I wonder if it works to add the right item to backup-directory-alist
so that backups of Tramp files will be written to the same directory
as the original file?
(add-to-list 'backup-directory-alist (cons tramp-file-name-regexp nil))
This ought to do the trick, but I haven't tested it. Could you test
it?
--
A preposition is not a good thing to end a sentence with.