0

I'm trying to start Jenkins hosted through Tomcat7. The JENKINS_HOME variable is pointing to /opt/jenkins. The problem I'm having is this: when I try to start the webapp, it fails if tomcat7 is not the owner of the /opt/jenkins folder.

If the permissions on the folder are drwxrwxr-x tomcat7:jenkins, I am able to start the webapp.

If the permissions on the folder are drwxrwxr-x jenkins:tomcat7, I am unable to start the webapp.

If tomcat7 is in the jenkins group, should it not have write-access to the folder? Why will the webapp only start if tomcat7 is the owner?

1 Answer 1

0

You can add your user account to a group with the following command:

sudo usermod -a -G <group> <username>

Do take care not to forget the -a (append) switch this tells usermod to add the group to the groups your user is already in otherwise it would replace all your existing groups with this one.

Note that the groups are read at user login thus you will need to log out and back in again before the change will take effect.

1
  • I've updated the question to be a little bit more specific. The question is more about, why does tomcat7 need to be the owner of the folder, instead of just being in the group with write permissions?
    – user351871
    May 24, 2016 at 16:53

You must log in to answer this question.