I had a strange situation where I've found a number of files and folders that had 000 permissions set. This was easily repairable via:
sudo find . -perm 000 -type f -exec chmod 664 {} \;
sudo find . -perm 000 -type d -exec chmod 775 {} \;
Unfortunately I suddenly realized the problem was a bit more complicated with some odd permissions such as 044 and some other strange settings. It turns out that these are strewn about and unpredictable.
Is there a way to search for permissions such as 0** or other such very limiting permission configurations?
Best Answer
I'd use something like this:
Or if you prefer the octal notation:
Unfortunately, no idea, how to take it as one
-perm
option.That syntax above is standard except for the
-ls
part (common but not POSIX) which you can replace with-exec ls -disl {} +
on systems wherefind
doesn't support-ls
to get a similar output.