On Wed, 2004-09-01 at 06:55, Vincent Voois wrote: > We've been talking about Linux security issues... i'm just wondering > how many fool-traps are in there and how they can be > recovered, i mention one: > > -bash-2.05b$ su > Password: > [EMAIL PROTECTED] /]# > [EMAIL PROTECTED] /]# chmod +444 -R * > > > If anybody can see what is going on... i just changed all > file-permissions to read-only on all files from the root. > I was fortunate enough to do it in one of the var subfolders so i > could quickly restore the damage i had done. > > I found this neat script that offers you to backup a file-permission > state of the path's you supply, but it's a disaster > recovery method and not a prevention tool against typo's:
Looks good. :) However this problem has happened before with many other here (ahem) and I think that MDK will partially fix this if you use msec. Last time I used msec, I think it had some drawbacks for this problem, such as it would not restore permissions for non-system-related stuff. Which would make your script superior for this kind of thing, so I will definitely save this script for a deeper later look. > (i also made stupid typo's like "chmod +spermbackup.sh", but this > aside) lmao > > I'm wondering how many pitfalls there are that one should be very > cautious for and if one do falls in, how it can be restored. The worst one I've ever done was what you did, but I did it worse because I was at /. (!) So I lost the perms for the entire filesystem. Fortunately I've never been at root and done anything like rm -rf. Knock on wood. :) LX
____________________________________________________ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Join the Club : http://www.mandrakeclub.com ____________________________________________________