Chmod -x chmod
31–34 of 34 posts
Re: Chmod -x chmod
#32Earlier quoted context omitted.
Couldn't you just set an appropriate umask and then make a copy of chmod?
I don't think umask setting affects the executable bits of files, just directories. You can try by entering something like umask 0; touch foo; ls -l foo
Re: Chmod -x chmod
#33I'm stupid, I guess. I saw the last slide ("there is no problem as the system is still running" (and chmod can therefore still be executed)) and thought that was the solution. Once again I've learned that for every problem there is a solution that is clear, simple and wrong (and that I myself am quite likely to hit upon this solution). If you try it, you'll find that it doesn't, in fact, work. Apparently the shell pe…
Re: Chmod -x chmod
#34Earlier quoted context omitted.
What about: find / -type f -perm +x | xargs chmod -x EDIT: chmod has to be the last program to be chmodded, in the above list.. :-)
Your use of xargs can lead to nasty surprises because of the separator problem http://en.wikipedia.org/wiki/Xargs#The_separator_problem GNU Parallel http://www.gnu.org/software/parallel/ does not have that problem. Watch the intro video for GNU Parallel: http://www.youtube.com/watch?v=OpaiGYxkSuQ