please can anyone help with a solution? am getting an error message that says permission denied anytime I try to upload files to my (LEMP) server using File Zila. I have tried changing the file permission in File Zilla to 777 but still does not work.
Asked
Active
Viewed 2,599 times
2 Answers
-1
if you have SFTP then follow below steps:
sudo chmod -R o+rw /var/www/html /* Location for folder or file */
chmod -R 755 /var/www/html/ /* Location for folder or file */

Infostans
- 310
- 2
- 12
-
I have tried your suggestion but I get another error: Operation not permitted – David Maxwell Nov 02 '21 at 08:17
-
1@DavidMaxwell because you haven't SSH or SFTP access.Please check with Server and connect terminal and set permission with above command – Infostans Nov 02 '21 at 08:41
-1
If you are trying to give the {user} as well as the www-data both access to the website directory try this
//without {}
sudo usermod -a -G www-data {userName}
#This adds user to www-data group
//set permissions for user group www-data
sudo chgrp -R www-data /var/www/html
//followed by
sudo chmod -R g+w /var/www/html
this will enable {user} to use SFTP with the FileZilla or other programs to read and write files in the directory without sudo