Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

I have a directory with numerous files. Part of the files have the 755 permissions and the other part have 644 permissions. I'd like to convert the files with 755 permissions to 644. I have tried the following line by running it from the directory itself:

find . -perm 755 -exec chmod 644 {}\;

However as a result, the permission changed only for the directory itself and after changing it back I found out that the files permissions remained unchanged. Do I miss something?

share|improve this question
Your command removes the executable bit from the directory, making it impossible to chdir to it and look at the files it contains. That's why the command doesn't seem to be working. Try find ./ -type f -exec chmod -x {} \; instead. – Shadur May 22 '12 at 11:20
up vote 7 down vote accepted

Ok, it seems that I've found the problem. It seems that there must be a mandatory space between the {} and \;, so the command will look like this:

find . -perm 755 -exec chmod 644 {} \;

Rather than:

find . -perm 755 -exec chmod 644 {}\;

Also the issue with changing the directory permissions can be solved by adding a -type f flag, so it'll look as follows:

find . -type f -perm 755 -exec chmod 644 {} \;
share|improve this answer
You could use + instead of \; to reduce the number of subprocesses created. – Kevin May 22 '12 at 14:48

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.