I’m uploading one file from one server to other using ssh2_scp_send().
Everything works fine, the only problem is that I don’t know how to change the owner and the group of the file after finishig the upload.
How can I preform some kind of chown in the ssh2
Maybe you can do that with the
ssh2_execfunction, which seems to allow running an arbitrary command on the server you’re connected to.That command could be the
chownyou’re trying to execute.The example from the doc says :
Replacing that “
/usr/local/bin/php -i” with your “chown user.group filename” might do.