permission denied editing web files
1 Attachment(s)
I am a bit confused and not sure what to look up to fix this issue. When I log in as user, I cannot edit my /var/www/html files.
I have the ownership of /var/www/html set to apache:apache (using centos 7). When I check groups for user it shows user and apache. That does mean I'm apart of the apache group right, and if the /var/www/html is owned by apache, I should be able to edit? |
Sometime only the owner of a file has editing rights (and sometimes no one has write permission -- it depends on how the files' permission is set). Please post the output of:
Code:
ls -l /var/www/html Do you have root access to the system? The root user can edit any file and manipulate its permissions. However, it's not good to do day to day work as root, so you should set the permission of the files you want to edit such that your user account can modify them as needed. |
Give the ouput of:
Code:
ls -l /var/www |
1 Attachment(s)
It's owned by root, but I can only create it by being root. I think I need to get a better understanding of permissions.
|
Code:
chown apache. /var/www/html -R |
I thought I was already in the apache group. When I displayed "groups ron" my result was "ron : apache" I read that usermod lowercase "g" set primary group while uppercase "G" set secondary group. I'm not quite sure if I have my head around that yet, but this what I did. It appears to work.
Code:
usermod -g apache ron |
All times are GMT -5. The time now is 06:11 PM. |