CHMOD Big Oops!

David D Turley turley at
Wed Oct 25 07:04:51 MDT 2006

On Tue, 24 Oct 2006 22:22:00 -0600 David D Turley <turley at>
> Ok, lets say I "accidently" executed the command:
> chmod -R 777 .
> from the root directory.  What do I need to do to re-secure my 
> system and
> undo this big oops?  
> System: Debian - Etch
> ______________________________________________________________________

Thank you all for your responses.  Thankfully, this is not a production
system and my job/life does not depend on this (Thanks for the offer
Ryan!!).  This is merely a LAN box that is my
DHCP/DNS/NTP/SAMBA/Apache(local)/Debian Mirror/Local Backup box.  I was
writing (yet) another script to try and simplify my life when my "spacing
thumb" got in the way and a line that should have read:

chmod -R 777 /path/to/some/apache/public/share/.
chmod -R 777 /path/to/some/apache/public/share/ .

This was executed several times to see if the desired result accored (it
did), and was added shortly to a Samba POSTEXEC.  When my logfile
exploded is when I saw the error of my ways and the unexepected results
of my command.  Luckily the only two accounts on the box are mine and
root, and they only real "public" access would be anybody who could get
through my WPA wifi, and directly get to Apache or Samba.

My initial thought was to somehow chmod back/reduce access to the /etc
and /home directories and password locations and very specific

Any ideas before I spend several days rebuilding?  Once again my name
gets added to the Linux Cautionary Tales list...<sigh!> Thanks again to
all the earlier responders!!!


More information about the PLUG mailing list