I'm uploading files from my windows computer to my personal linux server.
After the upload I want to change the user and group from root to nginx.
Can I do that with job > execute command
And put my chown -R nginx:nginx /data/www here ?
Or is the command executed only locally ?
Can I run a chown command on right hand side / sftp ?
Re: Can I run a chown command on right hand side / sftp ?
Hello,
unfortunately it is not possible. Custom commands can only be run using the FTP protocol, not SSH/SFTP.
I will check if it can be added for SFTP. Currently you can only set the permissions, for example 755. This feature is on the Advanced tab sheet of the Internet Protocol Settings dialog.
Here's an example script for FTP, but not all FTP servers support this syntax:
See also
https://www.syncovery.com/pascalscript/
unfortunately it is not possible. Custom commands can only be run using the FTP protocol, not SSH/SFTP.
I will check if it can be added for SFTP. Currently you can only set the permissions, for example 755. This feature is on the Advanced tab sheet of the Internet Protocol Settings dialog.
Here's an example script for FTP, but not all FTP servers support this syntax:
Code: Select all
function OnUploadComplete(const FileName, LocalFilePath, CompleteURL: UnicodeString;
const isRightSide:Boolean;
const FileSize:Int64;
const Connector: Opaque):Boolean;
var CmdRes:Int64;
ResponseText:UnicodeString;
begin
CmdRes:=ConnCustomFTPCommand(Connector,'SITE CHMOD 777 '+FileName,200,200,200,ResponseText);
Log('Set Permissions for '+FileName+': '+ResponseText);
Result:=true;
end;
https://www.syncovery.com/pascalscript/