How to handle SFTP clients after disabling root user

June 23, 2015 2.3k views
Nginx Deployment Ubuntu


I recently setup my first droplet, I basically configured it following these two tutorials.

1- Server Setup

2- Additional Recommended

I have been SSHing from the terminal and everything works fine. Today I tried to use my FTP client (Transmit) and I realized that since I disabled the root user and because I'm using a user who requires the use of 'sudo' this wasn't going to be possible and I was right, I cannot upload files to folder that outside my user folder.

How is this typically handled?

How can I use my FTP program to upload files to my server?

Do I need to enable the root user?

Can someone be so kind and give me some direction?


5 Answers

You don't need to activate root to do that.

In Transmit check these settings:
Protocol: choose SFTP
Server: your full domain name or IP
user name: your sudo username (not root)

Port: only enter somthing here if you changed the default port 22 to something else

Once you start modifying files on your server via Transmit you may run into permission issues.
If you do connect via SSH to your server and type this into the command line:

chown -R demouser. /var/www/html
  • change "demouser" to your name (keep the dot at the end)
  • change "/var/www/html" to whatever your folder structure is you need to change

I don't get this. I had

 chown -R apache. /var/www 

So Joomla can install files and update configuration. But I also want to be able to add/delete/change files via sFtp. However when I do the other chown than apache cant write and Joomla stops working (instaal,change config, etc).

chown -R someUser. /some/folder worked fine.

Quick question, I have multiple sites inside the "www" folder (/var/www), do you see a problem if I give a user write access to the entire "www" folder instead of doing one by one?

chown -R demouser. /var/www

Is this good practice?


  • I'm not an expert but I wouldn't see a problem because the www-folder is still outside your actual server system files which is one level below www and therefore not changeable by demouser

  • I now used sudo chown -R $USER:$USER /var/www/

    So I can SFTP to all sites and all sites (Joomla) keep on working. Is this secure (enough)?

Sugarhill thanks for the additional input. Also, for work related large file transfers I'd take a look at Innorix DS.

Have another answer? Share your knowledge.