[Discuss] su stopped working
pw
p.willis at telus.net
Mon Oct 16 10:23:54 PDT 2006
pw wrote:
> Murray Strome wrote:
>
>> However, if I did accidentally
>> use the chmod -R incorrectly, lots of things are probably incorrect.
>> Anyway to fix them without reinstalling?
>>
>> Murray
>
>
>
> Get someone you trust, who has the same distro,
> to dump their system wide file permissions into a text file.
>
> cd /
>
> find * -printf "%h/%n|%#m|%g" | grep root > text.txt
>
> ie:
>
> /full/file/path/filename|nnnn|root
>
> where 'nnnn' is the numeric file permission for each file.
>
> Then just run a script against the files listed to change
> permissions for each file.
>
>
> cat text.txt | awk -F "|" '{print "chmod "$2" "$1}' > fix.sh
>
> sh fix.sh
>
>
> With a little tweaking you could also change the ownership of
> files and directories if those are bad as well.
>
>
> Peter
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://ladybug.vlug.org/cgi-bin/mailman/listinfo/discuss
>
ERRATA:
find * -printf "%h/%n|%#m|%g\n" | grep root > text.txt
forgot the newline ^^
Peter
More information about the Discuss
mailing list