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

I want to add (not modify other file permissions) for all the directories in the path written bellow. Something like chmod -R xx4 /home/mDB/admin/KNUCKLES/dbs/

The path


I try with this command i found in a forum but doesn't work for me.

chmod +r /home/mDB/admin/KNUCKLES/dbs/ -R

I only want to change the permissions for all the users not for the file/directory owner or the groups.

Thanks in advance.

share|improve this question

migrated from Oct 3 '13 at 15:14

This question came from our site for professional and enthusiast programmers.

chmod +r -R /your/path should make it. What error do you get? – fedorqui Oct 3 '13 at 12:52

2 Answers 2

up vote 3 down vote accepted

You can say:

chmod -R o+r /home/mDB/admin/KNUCKLES/dbs/

This would give read permission recursively to others, i.e. not owner/group.

EDIT: As per your comment, it seems that permissions for directories is the issue and not that of files. You could say:

chmod o+rx /home/mDB/{admin,admin/KNUCKLES,admin/KNUCKLES/dbs}

Note that since these are directories, you need to set the execute x bit on. Without that, r would serve no purpose!

share|improve this answer
Sorry, i think my explanation is not so clear. I want to add read permissions for the folders /admin, KNUCKLES and dbs not all the folders inside dbs. – Jorge Vega Sánchez Oct 4 '13 at 14:49
@JorgeVegaSánchez See the edit above. – devnull Oct 5 '13 at 6:25
Great answer. Thanks. – Jorge Vega Sánchez Oct 6 '13 at 9:35

You'll have to split it up and issue multiple commands.

chmod -R xx4 /home/
chmod -R xx4 /home/mDB/
chmod -R xx4 /home/mDB/admin/
chmod -R xx4 /home/mDB/admin/KNUCKLES/
chmod -R xx4 /home/mDB/admin/KNUCKLES/dbs/

Someone with more advanced command-line-fu than me may know a shorter way.

share|improve this answer
Ok, there is no only a command to do that task. Thanks for your answer. – Jorge Vega Sánchez Oct 4 '13 at 14:45

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.