The webmaster does not have permission to write

May 3, 2017 1.5k views
LEMP Debian
doreasss
By:
doreasss

Just set the site, the site upload file reminder no permission, although the authority is not set up 777, still reminder can not upload the error

3 Answers
hansen May 3, 2017
Accepted Answer

Hi @doreasss
I'm guessing your root is /var/www/html and you're using the default www-data user.
Run these commands to reset rights:

find /var/www/html -type d -exec chmod 755 {} \;
find /var/www/html -type f -exec chmod 644 {} \;
chown -R www-data:www-data /var/www/html

Hi there:
if you using nginx ,please you charge affiliated users is nginx , and set the permissions to 755 , so , you after will no longer be error. (run chown -R nginx * and chmod -R 755 * )
if you using apache , so , it needs to be solved separately

  • Hello, thank you for your help, I use the apache, how to set up?

    • I just created the site can not upload through the administrator to update the site, an upload file will prompt 500 error

    • Which Linux distribution do you use?

    • ha
      If you are using centos, then you need to enter the site directory / var / www / use chmod -R 755 * command to change permissions. And then the system of apache users set to their users and groups (using chown-R * apache: apache), if the source code compiler, then upload the error there is no problem with the authority of the user.

Have another answer? Share your knowledge.