Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I'm basically trying to do is allow jenkins access my android-sdk-linux folder and all the sub-directories. My boss does not want to change permissions on the folder himself. I am supposed to do it during the build process. I have seen some examples that run some commands in the execute shell during the build process. Is there some commands that can I can run in that execute shell so that jenkins can have read write and execute authority on my android-sdk-linux folder ?

Thank you

share|improve this question
and I do not want to run jenkins as root user – tanzeelrana Jun 13 '13 at 20:49
Can I change the permissions of this android-sdk-linux folder and its sub-directories through the the execute shell before starting the build process and then changing the permissions back to default after the build process is complete? – tanzeelrana Jun 13 '13 at 20:53
To change the permissions through the execute shell you would need to run it as a user having root privileges anyway, so it would just move the problem. Why does your boss refuse to change permissions on the directory itself? It looks like the simple and sane solution imo. – David Levesque Jun 13 '13 at 21:53
he does not want the files to be accessible by anyone else. when I asked him he told me "I do not want them open to the world" even though we have all these files on our company's local server. Definitely he is not going to allow me to run it as a root user. – tanzeelrana Jun 14 '13 at 13:08
Changing the permissions does not mean to "open them to the world" or to make them available to anyone since system users are not people. You could use Linux groups, for example. – David Levesque Jun 14 '13 at 18:02
up vote 1 down vote accepted

If you have extended attributes available you can give individual users access with the setfacl command like so.

setfacl -Rm u:jenkins:rwx android-sdk-linux

Lacking ACL support you would likely have to create a group which is shared by all users who should have access and ensure that the directory is created with the appropriate permissions for that group.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.