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

chmod +x file changes a file from rw-r--r-- to rwxr-x-r-x but really I only wanted rwx-r--r-- is this possible?

share|improve this question
You'd be much more likely to get a good answer on Unix/Linux SE – evamvid Mar 11 '14 at 0:58
chmod u+x file. u=user, g=group, o=others. – jweyrich Mar 11 '14 at 1:15
@jweyrich put that as an answer -- that's more elegant and better than my way... – evamvid Mar 11 '14 at 1:17
The question probably has dozens of duplicates, but I posted it as an answer anyway. Glad it helped. – jweyrich Mar 11 '14 at 1:38
@evamvid this question is perfectly on topic here, no reason to suggest the OP take it to Unix & Linux. And I say that as a regular of both sites. – terdon Mar 11 '14 at 5:52

2 Answers 2

up vote 19 down vote accepted

To change only the permission for the current user, you can use:

chmod u+x <file>

Where u=user, g=group, o=others.

If you want to enforce the permissions you mentioned, this would be the ideal:

chmod u=rwx,go=r file

Optionally, you can do the same using the octal notation, as follows:

chmod 744 <file>

This will set rwx (the 7) for user, and r (the 4's) for group and others.

share|improve this answer

Try running chmod u=rwx,go=r file.

In my case, that gives the permissions as rwx-r--r--, which I think is what you meant.

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.