If you did that 'ls' command in the same shell where you did the 'sudo' 
commands, it did not work because group membership is applied to your session 
at login time. You would need to logout and login again for your session to 
belong to the new groups(s). When you run 'sudo -u jenkins' that creates a new 
session that *is* in the new groups, but your existing session is not.



----- Original Message -----
From: jenkinsci-users@googlegroups.com
To: jenkinsci-users@googlegroups.com
At: Feb  5 2013 14:50:32

Hi,

Some of my jobs need to access directories outside of the workspace. In my
Hudson environment, I changed it to run as another user but that causes
substantial issues at upgrade time. I'd like to avoid that with Jenkins.

- Jenkins is running on an Ubuntu server.

- The jobs run as user 'jenkins', group 'nogroup'
    sudo -u jenkins groups
    nogroup
Note there are files in the /var/lib/jenkins that belong to 'adm' group. I
don't know which userid the Jenkins updates use.

It seems to me there are a few choices:
1) chgrp the external directories to the "nogroup" group. This should give
jenkins userid access to the directories via the group permissions
2) chmod the external directories to 777. Go wide open
3) add jenkins userid to the same group that the external directories
belong to.
4) create a new group and add the jenkins userid and all the external
directories to the new group. The jenkins userid will still belong to the
nogroup group and so the updates should work correctly.
5) or some other technique

What is your recommendation?

PS just tried #3, but still go permission denied
      sudo usermod -a -G cm6 jenkins
      sudo -u jenkins groups
      nogroup cm6
     ls: cannot access /home/cm6/Applications/blah.xml: Permission denied

John

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to