I have a user jenkins
in group jenkins
. I want to have access to the directory /var/www/html/
, so I have changed the directory group from root
to jenkins
.
$ ll /var/www
...
drwxrwx---. 7 root jenkins ... html
...
$ groups
jenkins
$ cd /var/www/html
-bash: cd/var/www/html: Permission denied
User from /etc/passwd
:
jenkins:x:779:779::/home/usr:/bin/bash
The owner and group of /var
and /var/www
are root
. As I understand I shouldn't change their group as well, only the directory I want to access.
Do you have any idea why this isn't working?
EDIT: $ ls -l /var total 97 ... drwxrwx---. 8 root root ... www ...
Sorry for not displaying the full output, it is from an offline computer. I don't know what is executable path but this file is the only one that looks different:
lrwxrwxrwx. 1 root root ... mail -> spool/mail
ls -l /var
? (Trying to see if there is a eXecutable path from /var to /var/www/ to /var/www/html to cd into).