Re: Maintaining file permissions with sftp



Roberto,

There's nothing in the sftp man page. My preference is to use rsync if you want to retain permissions. Use the -o and -g flags, or, -a but be aware that -a will perform a recursive sync if it finds a directory. Just check out the man page.

Tim

On Mar 11, 2011, at 7:10 AM, Roberto wrote:

Hi,

when making a sftp file transfer, overwriting an existing file, is there any way to preserve the permissions of the file? So, if the file had permissions like 664, to preserve them instead of overwriting them with any other permission.

Thank you,

Roberto

PS: System setup: server is running OpenSSH 5.1p1, from Debian packages, clients are running windows versions of sftp

--
-----------------------------------------------------
Marcos Roberto Greiner

Os otimistas acham que estamos no melhor dos mundos
Os pessimistas tem medo de que isto seja verdade
James Branch Cabell
-----------------------------------------------------




Relevant Pages

  • Maintaining file permissions with sftp
    ... when making a sftp file transfer, overwriting an existing file, is there any way to preserve the permissions of the file? ... So, if the file had permissions like 664, to preserve them instead of overwriting them with any other permission. ... Os otimistas acham que estamos no melhor dos mundos ...
    (SSH)
  • Re: Tam Lin podcast site
    ... permissions bits, since they're easier to grok in sets of three. ... ratio marches^Whurtles towards zero. ... mistakes such as executing a non-executable file, or overwriting ... with this year's January 4th email file, ...
    (rec.arts.sf.fandom)
  • Re: Need help with server security privileges
    ... The link below explaining special permissions may help. ... If they have modify ... deleting, or overwriting existing data. ... > folder permissions. ...
    (microsoft.public.windowsxp.security_admin)
  • Losing Custom Icons when Scheduled Tasks are Run -- WORKAROUND!
    ... was executing: ... and this was overwriting the info stored there with the info found here: ... so as to deny SYSTEM Set Value permissions. ...
    (microsoft.public.windowsxp.general)
  • Losing Custom Icons when Scheduled Tasks are Run -- WORKAROUND!
    ... was executing: ... and this was overwriting the info stored there with the info found here: ... so as to deny SYSTEM Set Value permissions. ...
    (microsoft.public.windowsxp.customize)