Sample Header Ad - 728x90

Getting "Permission denied" when trying to create a file despite correct permissions

-1 votes
1 answer
3202 views
I’m using Amazon Linux and running a script through a Jenkins job, including this line touch /usr/java/jboss/standalone/deployments/myproject.war.dodeploy which results in the error … touch: cannot touch ‘/usr/java/jboss/standalone/deployments/myproject.war.dodeploy’: Permission denied I thought I had the perms and groups set properly, so I output those in my script as well. But I can’t see why things are falling apart. Below is the output. What else do I need to do to get my touch command to work? + whoami jboss + groups jboss jboss : jboss evotext + ls -al /usr/java/jboss/standalone/deployments/ total 20 drwxrwxr-x 4 deploy evotext 4096 Apr 23 18:18 . drwxr-xr-x 8 jboss evotext 4096 Jun 24 2013 .. drwxrwxr-x 11 jboss evotext 4096 Apr 23 18:23 myproject.war drwxrwxr-x 9 deploy evotext 4096 Apr 22 19:21 jenkins.war -rwxrwxr-x 1 deploy evotext 11 Apr 22 19:21 jenkins.war.deployed + touch /usr/java/jboss/standalone/deployments/myproject.war.dodeploy touch: cannot touch ‘/usr/java/jboss/standalone/deployments/myproject.war.dodeploy’: Permission denied Build step 'Execute shell' marked build as failure
Asked by Dave (2808 rep)
Apr 23, 2016, 06:28 PM
Last activity: Apr 16, 2019, 01:28 PM