Hi,

I'm trying to configure a post-build action, but it fails on a file 
copy/touch command.

In the log output the situation is clear, jenkins is not a member of the 
group tomcat7, so he doesn't have the right to create that file.

Jenkins-Console-Log:
[...]

SNAPSHOT/web-1.0-SNAPSHOT.war
channel stopped
[workspace] $ /bin/bash -xe /tmp/hudson7730141733158377543.sh
+ whoami
jenkins
+ ls -lat /var/lib/tomcat7/webappsTnbt/
total 12
drwxrwxr-x 3 tomcat7 tomcat7 4096 Sep 12 00:38 .
drwxrwxr-x 2 tomcat7 tomcat7 4096 Sep 12 00:15 web-1.0-SNAPSHOT
drwxr-xr-x 8 root    root    4096 Sep 12 00:14 ..
+ groups
jenkins
+ touch /var/lib/tomcat7/webappsTnbt/foo.txt
touch: cannot touch `/var/lib/tomcat7/webappsTnbt/foo.txt': Permission denied
Build step 'Execute shell' marked build as failure
Finished: FAILURE




What I don't understand is, on the operating system level, the user jenkins is 
member of the group tomcat7.
I added him to the /etc/group file and on the command line I get the following 
responses for that user:

$ whoami
jenkins
$ groups
jenkins tomcat7

and esp. the touch command works.

So why does the group membership differ for the jenkins user for those two 
situations described above?

What am I missing?

Cheers,

Martin

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to