[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

chmod -R bug

From: Constantin Berhard
Subject: chmod -R bug
Date: Sun, 07 Mar 2010 14:52:53

Hey guys.

I have a directory tree full of executable files but they should not be 
executable. So I first wanted to do a
chmod -R -x *
and then a
chmod -R +X *
so that the directories can be opened again. But chmod makes a big mistake with 
the first order: It first makes a directory unopenable and _then_ tries to open 
it recursively. There should be an if-statement with the -R switch so that if 
the mode will add opening permissions for directories, then it should first 
apply the rules to the directory and then open it recursively but else, if it 
will remove the opening permission for directories, then it should first go in 
recursion and then make the directory unopenable.

Regards, Constantin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]