Permission on SFTP

Dear concern,

We want to send files in remote machine through "sftp test@ipaddress" command. But our intention is to change the owner of files from "test" user to "dev" user while uploding files through sftp. Is there any feature in sshd server to do the activity. Please advise.

ssh test@ipaddress 'chown dev /path/to/filename'

This line comes after the sftp command completes.

This will work if:

test is the owner of filename
you are using ssh keys for both sftp and the ssh command
there is no chroot jail set up for the 'test' user on the remote side.

If you sign in with SFTP from the command line, is there an option in the remote help? Usually the rhelp command will display the list. You might need to use something like site chown ........

Does that help?

Robin