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

Re: [users] NO! chmod strikes!

On Sat, Jul 14, 2001 at 10:21:51AM -0400, JoshNarins@aol.com wrote:
> Joost, your solution was such an elegant thing, that to
> ruin my system to learn it was fair enough.

Thanks for the compliment.  Don't ruin your system just to try this,
because it is not perfect.  Consider what happens if you:

  chmod a-x /bin/chmod
> > but anyway, a question for all debianers: how do you get the default
> > permissions back on the / tree?
> If you have a clean host with very similar filesystem contents, try this:
>   ssh root@okayhost "find / -regex '/\(mnt\|proc\|tmp\)/.*' -prune -or \
>       -not -type l -not -type s -printf '%04.4m %u %g %p\n' " \
>     | while read mode user group path
>     do 
>       chown $user.$group $path 
>       chmod $mode $path 
>     done 

Reply to: