W
W
wagwan2016-04-28 14:40:15
linux
wagwan, 2016-04-28 14:40:15

How to solve rights problems?

Hello. I am using Linux Ubuntu 14.04
Downloaded apache with all modules and settings.
Everything that could be configured for convenience - configured.
However, now there is a problem when installing any engine.
I upload files to the root of the "/var/www" folder.
Before that, I give the rights so that you can somehow interact with this directory:

sudo chmod 775 /var/www
sudo chmod -R 775 /var/www

In the engine installation instructions ( docs.instantcms.ru/manual/install ), they ask you to set your rights to the folders, which I do. However, after doing this, the site is not displayed at all:
You don't have permission to access / on this server.

Tired of fiddling with rights. Tell me how to configure Apache correctly?
Or what to do in this situation?
Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Ergil Osin, 2016-04-28
@Ernillew


sudo chmod 775 /var/www
sudo chmod -R 775 /var/www
For such rights, it is necessary to beat hands and tear off everything that comes off. Why do you have write access to the directory for everyone in the group? Why do you have all the executable files?
chmod 750 /srv/www
chmod -R 640 /srv/www/
PS The directory containing the data returned by the web server for more than 13 years should not be in /var, this is a relic of the past, /srv exists for such purposes, read FHS.

V
viiy, 2016-04-28
@viiy

See what user apache is running as (User in httpd.conf), usually it is apache
Change the owner of the directory
After that chmod will work as it should.

R
Ruslan Ganeev, 2016-04-28
@GaneevRR

Apache, MySQL stopped when he gave write permissions?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question