scp not overwriting remote file with group write permissions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi there,

I've got what is probably either a known or simple issue but can't
seem to sort it out. I'm trying to scp a file from my local machine to
a remote host and overwrite the destination file. The account that I'm
using on the remote machine doesn't own the file but is in the group
that the file belongs to and the group permissions on the file and the
parent directory are set to read/write. When I scp the file it gives
me a permission denied error when it attempts to overwrite it.

I have been able to get around this in one of two ways. First, I can
scp the file to a temporary location on the remote host and then log
on to the remote system and cp it over the other file. Second, I can
delete the destination file via scp and then scp the updated file
after the original file is gone.

The sshd on the server is OpenSSH, Debian package version 3.6.1p2-9. I
have tried several client scp programs, WinSCP, PuTTY (which I guess
are the same base scp code) and OpenSSH 3.6.1p2-9 on a Linux box and
all have the same result.

So... am I being obtuse? Is there an obvious workaround? I've been
beating my head on this one for a fair chunk of the morning and
haven't come up with any good solution.

Thanks for any help,

Dan Reagan
non posted resposes to googleresponse at vose dot org

Site Timeline