chmod problem

Alexander Kirillov ulist at
Tue May 10 13:24:11 UTC 2005

Matthew S-H Wrote: 
> I just made a slight "oopsie".
> I was changing the permissions of everything in a directory inside my
> home folder recursively, and I meant to type "chmod 777 .a*", but I
> accidentally typed "chmod 777 .*".  I stopped it in the middle of what
> it was doing right after noticing an error referring to a file it
> couldn't change the permissions of.  It stopped while in the middle of
> changing permissions something in a directory within my home
> directory.
> Now everything in my home folder with a starting letter before "L" (i
> guess it was doing it in alphabetic order) has the permissions 777
> (rwx for all users).  Does anyone know of any way I can get back the
> defaults?  Or of any way I can have the permissions reverted to the
> way they were less than 10 minutes ago?
> Note that my last backup was a LONG time ago.  I'd rather deal with
> unrestricted permissions than with losing all of my recent work.
> ~Matt
> -- 
> ubuntu-users mailing list
> ubuntu-users at

The old permissions are not stored anywhere, so there is no way to
tell the system "restore the permissions to the state 10 minutes ago".

There are two ways I see: 

- do chmod 644 .* - to make all files have permission 644 (or whatever
is the permission you want to have as default)


- get that old backup, use it to lookup what permisssions those fiels
had, and then chmod each of your files to the correct permission
(without changing files content). You can write a bash script to do
that - but I am not very good at shell scripts. Or maybe file
synchronization tools, such as unison can do this?

Alexander Kirillov

More information about the ubuntu-users mailing list