By writegnj
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
sudo chown -R www-data:www-data /var/www on your terminal.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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If you use serverpilot - then use this command below: sudo chown -R serverpilot:serverpilot /srv/users/serverpilot/apps replace serverpilot in the command above with the name of the system user.
This question was answered by @writegnj:
I found an answer on this page on comment section. Look for the comment made by sugarhill.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.