SFTP permissions

I have a question regarding sftp permissions. I have a client who
sftp's files to a directory on our HP-UX 11i server from a script on a
Windows 2003 server and the file permissions on the transferred file
are -rw-r----. Is there any way for those files to be rwxrwx--- when
they are sftp'd? Or, is there any way to move those files to a
different directory? The reason I'm asking this is b/c I need to
process the incoming files in a ksh script and then move those files
to an archive directory. With read-only permissions the move cannot
be done and thus, the file gets processed over and over. Any insight
to finding a fix would be great.

Thanks,
Charlie
Charlie [ Fr, 01 Februar 2008 18:08 ] [ ID #1921518 ]

Re: SFTP permissions

On 2008-02-01, Charlie <cfrussell [at] gmail.com> wrote:
> Windows 2003 server and the file permissions on the transferred file
> are -rw-r----. Is there any way for those files to be rwxrwx--- when
> they are sftp'd?

Just improve your script:

sftp> help
Available commands:
[...]
chmod mode path Change permissions of file 'path' to 'mode'
help Display this help text
[...]

Include a "chmod" command after every "put".

Best regards.
Claudio [ Fr, 01 Februar 2008 20:10 ] [ ID #1921526 ]
Linux » comp.unix.shell » SFTP permissions

Vorheriges Thema: Search replace doubt
Nächstes Thema: Backspace key not working in RCS