How to use sudo over SFTP with CyberDuck?

Posted on Apr 12, 2023

Question

I'm copying this question from over here: http://getsatisfaction.com/cyberduck/topics/can_i_use_sudo_over_sftp_with_cyberduck

I am having the same issue and finding it hard to find an answer:

I am using Cyberduck over SFTP. I can connect and browse files fine, but when I try to upload, I get a permissions error. Web host says I need to use the 'sudo' command. I know how to do this via Terminal, but it is possible to to tell Cyberduck to use sudo?

Please don't tell me to use root because:

What if you don't have root access or don't want to enable root access?

Answer

I upload the file with cyberduck to a folder where i can write to (e.g. the home folder of the cyberduck connected user). Then i login to the machine via ssh and sudo mv the file to the desired destination folder.