[plug] Recovering from munged permissions
Bernard Blackham
bernard at blackham.com.au
Sat Jul 5 01:09:08 WST 2003
On Sat, Jul 05, 2003 at 12:44:06AM +0800, Cameron Patrick wrote:
> My current plan of attack involves using find and xargs:
> - Set all directories to 755
> - Set all non-directories and non-symlinks to 644
> - Use 'file' to locate ELF executables and chmod them 755
> - Locate shell scripts with egrep -r '^\#\!(.)?/bin/(ba)?sh'
Sounds like a good plan. Though executable "scripts" could start
with #!<anything>. If it's an older system there might be a.out
executables too :)
> Now AFAICT that only leaves sorting out dot-files. Nothing bad should
> happen if everything inside .kde, .mozilla, .openoffice, and other such
> directories are chmod'd to be readable only by their owner?
Nope. And probably a wise move to do anyway!
> Are there any dot-files which are normally marked executable that
> I should know about?
The only dot-files I've ever seen executable were .profile's but it
was probably a requirement of a shell (that wasn't bash or zsh).
> On an unrelated note: at one point "ls" used to sort ASCIIbetically
> with uppercase letters and dotfiles at the top. Recent versions seem to have
> stopped doing that and sort case insensitively, ignoring preceding dots.
> Is there a simple way to get ls to revert to the original behaviour?
ls -v seemed to do the trick for me. "Sort by version". Go figure :)
HTH,
Bernard.
--
Bernard Blackham
bernard at blackham dot com dot au
More information about the plug
mailing list