S
S
Sergey Burduzha2018-02-13 21:19:29
Apache HTTP Server
Sergey Burduzha, 2018-02-13 21:19:29

How to solve the problem with adding a user to the www-data group?

I'm on ubuntu, installed apache2, php. So far, everything seemed to be working, but when I decided to work with files, it turned out that the server had no rights to the files.
For a long time I studied articles on the Internet, tried many options, but nothing came of it.
Let me explain: I want to add my user to the www-data group in order to access the site. The folder /var/www is recursively owned by www-data

drwxrwx---  6 www-data www-data 4096 Jan 28 21:42 www/

Added a user to the www-data group
grep www-data /etc/group
www-data:x:33:serii

only now, I can not go to the www folder.
I don’t understand here, I added the user to the www-data group, but he was never added
groups 
serii adm cdrom sudo dip plugdev lpadmin sambashare

How to solve my problem, or can someone tell me a working instruction that will provide the user and the server with access to the site?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel, 2018-02-13
@serii81

Make it easier.
Start Apache on your behalf.
In console:
Change variables:

export APACHE_RUN_USER=login
export APACHE_RUN_GROUP=login

And then once I was tormented with these rights and other groups)
Well, about the group, then add like this:
And give rights recursively:
sudo chmod 775 -R /path/to/project

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question