Answer the question
In order to leave comments, you need to log in
Why doesn't usermod -a -G group user fix the file permissions issue?
In general, I can not understand why the expected does not happen.
Here's the case: Let's
say the user apache
Is apache configured to work as the user apache
Is the user maxim
Is the www
folder
Make the folder www :
chown -R maxim:maxim www
chmod -R 770 www
let's say done. now it's logical to get "You don't have permission to access / on this server."
But we know that permissions 770 imply full access for the group, so we add the apache user to the maxim
group
, execute the command
usermod -a -G maxim apache and
check/etc/group and I see there
maxim:x:600:apache
----- the error was in the absence of this item ---
I restart Apache
service httpd restart
----------------- ------------------------------------------------------
Now I'm waiting that apache will have access to the folder again, but it will again throw a 403 error.
Can you help me understand why this scenario does not produce the result I expected?
Answer the question
In order to leave comments, you need to log in
You need to relogin the user apache
. For a web server started by a user maxim
, but on behalf of apache
this, it means restarting httpd
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question