M
M
Michael2017-05-23 17:19:50
Apache HTTP Server
Michael, 2017-05-23 17:19:50

Where can I read about permissions for /var/www?

How many years have I been suffering with the rights to /var/www. Constantly some problems that have to be treated with crutches.

find /var/www/site -type d -exec sudo chmod 2775 {} \;
find /var/www/site -type f -exec sudo chmod 0664 {} \;

And I seem to have already read articles about the organization of rights, but there is no complete understanding.
Prompt suitable material where everything is chewed in detail about the rights and organization of sites in / var / www (ubuntu) in order to resolve this issue once and for all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
betal, 2017-05-23
@betal

1) suid/guid bits are not needed where they are not needed
2) project files must be readable and not writable by the webserver user.
3) of the writable folders, only upload / tmp / runtime
4) files higher in the folder tree are inaccessible (i.e. the web server process should not read the root of the disk)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question