-2

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.

David Maxwell
  • 51
  • 1
  • 9

2 Answers2

-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
-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