Mobile app version of vmapp.org
Login or Join
Speyer207

: /var and /var/www permissions The mode for both these directories is 755. I'd like to restrict permissions to 754. But if I do so, I'm thinking the apache www-data instance won't be able to

@Speyer207

Posted in: #Apache

The mode for both these directories is 755. I'd like to restrict permissions to 754. But if I do so, I'm thinking the apache www-data instance won't be able to access the directories to serve the contained files.


Is there a canonical mode for these directories. 2. What's a good way to provide the apache instance access: through creating some sort of group?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

Do not change the chmod for /varas this should remain default.

Apache runs on the usergroup www-data so /var/www should have the owner has www-data and not root, if this is the case then 754 is absolutely fine.

This may help:

chown www-data:www-data /var/www
chmod -R 754 /var/www


Normally this is set-up for you if you used an installer such as apt-get when installing Apache or nginx.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme