On Wed, Feb 17, 2010 at 1:28 PM, Michael Albinus <[email protected]> wrote: > It's not "me" (Tramp) who causes the problem. Emacs calls `set-file-modes' > on the original file. This fails in your case, it is not related to any > Tramp internal temporary file.
OK, I don't really understand what's happening. I could just observe from the strace that something inside in Emacs chmods the temporary tramp file, i.e. a file like /tmp/tramp.blabla, then tries to read it which fails. I have tried to override tramp-default-file-modes to (in my .emacs) (defun tramp-default-file-modes (filename) (tramp-octal-to-decimal "0666")) and then everything seems to work? I can open the file, save it, and it even has the right permissions on the server side. Just to make sure we're talking about the same thing, to reproduce, ssh over to some server, add a file like this echo foo > bar sudo chown root bar sudo chmod u-rw bar sudo chmod g+rw bar then try to access it with tramp. Without Tramp in Emacs 23, it fails. With the above hack, it works. > And yes, I believe Emacs shall follow file system conventions. > Otherwise, it would bypass the given security level, which might result > in undesired weaknesses. As I see it, the problem is that you can't just map the permissions directly from one system to another system because the users aren't the same on the two? Actually, from a security point of view, the only thing I care about is that nobody else on my local machine can accidentally read the file, unless they can also read it on the remote machine. Are there any other goals? > PS: does the patch works for you, reading that file? I don't have a development environment handy so I haven't figured out how to test it yet. If you can attach the whole function, then I can just override it from my .emacs, that would make it a bit easier? PS: Tramp is nice. Really impressed so far. Ole _______________________________________________ Tramp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/tramp-devel
