Report this

What is the reason for this report?

Using SFTP(FileZilla) with new user gets permission denied error

Posted on December 24, 2015

I have LEMP stack setup on Ubuntu and installed WordPress.

I followed tutorial to create new user beside root and been using for setting up the server. Now I’m trying to upload some files through SFTP using FileZilla and keep getting permission denied error.

My current permission is set to drwxr-xr-x 5 www-data www-data 4096 Dec 24 00:47 /var/www/html

I tried

  • Make sure that your /var/www directory is owned by www-data:www-data. to do that, execute sudo chown -R www-data:www-data /var/www on your terminal.
  • Make sure that your user is part of the www-data:www-data group. Run sudo usermod -a -G www-data username.

But still getting the permission error.

I know my new user can write with sudo command in terminal but on FileZilla it does not use sudo command and gives permission denied error.

Using root account will solve the issue but I want to know secure way to do this with new user.

How do I make new user to be able to upload files via SFTP? Is it possible? It not what is the others ways to do this?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.