Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 95056  / 3 Years ago, sun, august 22, 2021, 12:52:20

I am quite new to ubuntu and I have been trying to install BuilderEngine, a content management system, to my ubuntu server 12.04 lts. I have figured some things out but I am struggling with permission for files and folders.
I know I have to change the permission for folders and files in /var/www/ to be able to read and write files. But I am not sure what to do.



All I know is never use chmod -R 777 /var/www/ because that can read/write/excute files.



Was thinking of trying sudo chown -R www-data:www-data /var/www/ but not sure.


More From » 12.04

 Answers
6

Make sure the group is www-data on '/var/www'



sudo chgrp www-data /var/www


Make '/var/www' writable for the group



sudo chmod 775 /var/www


Set the GID for www-data for all sub-folders



sudo chmod g+s /var/www


Your directory should look like this on an ls -l output.




drwxrwsr-x




Last, add your username to the www-data group (secondary group)



sudo usermod -a -G www-data [YOURUSERNAME]

[#27128] Monday, August 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
diffeah

Total Points: 78
Total Questions: 130
Total Answers: 98

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
;