tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scp method fails setting rights


From: Michael Albinus
Subject: Re: scp method fails setting rights
Date: Wed, 05 Jan 2005 21:22:02 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Isak Johnsson <address@hidden> writes:

> Hello!

Hi,

> Saving a file on a remote server using scp fails if I'm not the owner 
> of the file, even though I've write permissions to both the file and 
> its directory.
>
> The reason is, I believe, that scp reports failure setting permissions 
> on the file, which I'm not allowed to do because I'm not the owner.

That's right. I could reproduce it with recent Tramp.

> A solution would be to just not alter the permissions on existing 
> files. Unfortunately scp has no option for this, the only one is -p to 
> "Preserves modification times, access times, and modes from the 
> original file". I guess that it's possible to use this and afterwards 
> touch the file, but it sounds a bit awkward. What do you think?

It wouldn't make sense to use -p this case, because nothing is
preserved (neither mode nor timestamp nor ownership). So an
alternative would be to apply scp without -p, and then apply the
necessary operations via the parallel ssh channel.

But this case one could use the ssh method instead of scp,
directly. The only advantage of the scp method wrt ssh is that for
large files the transfer could be faster. With the additional
operations via the ssh channel, this advantage would shrink.

> Would it be a good thing to make tramp ignore this particular error?
>
> Or, should I just choose another method than scp?

I recommend you should use ssh. I will add a note in the Tramp
documentation, that there is a limitation for the scp method in case
`copy-file' is called with a non-nil KEEP-TIME argument (but that's
always the case in dired, isn't it?).

> Thanks in advance, and a happy new year to you all!
>
> Isak Johnsson

Best regards, Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]