Allow root WinSCP File Transfer

If you have spent any time managing a Linux server from a Windows machine, than chances are you are aware of the limitations to this setup. Copying files to the server with non-root access can be a chore to say the least. The following tutorial has been tested on Debian 8 and Ubuntu 16.04. In the tutorial below, we will detail the steps required to enable root file transfer while logging in with WinSCP as a non-root user. Keep in mind that you will still be required to enter your user credentials when using the sudo command in a terminal session through putty.

Note: for the below tutorial to work, the user account you are using to login with WinSCP must be a member of the sudo group.
First, run the command below to create a file in /etc/sudoers.d:

Then in the SFTP setup section of WinSCP, edit the Server session advanced options by adding the command below under Protocol options (advanced edit window pictured below command):

If all the steps above went well, you should now have root access to the file system via WinSCP as a non-root user.

Did you find this article useful? Why not share it with your friends?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.