Saturday, February 24, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 492  / 2 Years ago, sat, july 2, 2022, 1:40:47

Trying to access a folder inside /var/www with:



cd layout


I get the following response:



bash: cd: layout: Permission denied


When I list the details, I get:



drwxrw---- 7 www-data www-data 4096 Apr  9 15:21 layout


I've not seen this www-data before - what is it and how do I correct it?



Edit (more info): I can access these files with root through nautilus.


More From » apache2

 Answers
6

www-data is the user apache uses for the website. This is set in the config file for apache.



$ grep wwww-data /etc/apache2
envvars:export APACHE_RUN_USER=www-data
envvars:export APACHE_RUN_GROUP=www-data


The Apache user/group should only have read access to the files in the web root so keep them as they are.



You should create a new group (something like www-admin) that has write access to those files and then add yourself to that group instead.



usermod -a -G www andy

[#31834] Saturday, July 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atetamme

Total Points: 11
Total Questions: 121
Total Answers: 109

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;