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

Re: I do a Big permission mistake



Khalid EZZARAOUI wrote:
> 
> hello,
> 
> never, never do :
>     chmod -R   o+r   .*
> anywhere. (I do it in /home).
> 

Yes, never do this.  The problem is that the expression .* matches
the "." directory (current directory) and ".." and directory (one
level up from current).  The problem just gets worse from there,
as the directory one level up has . and .. as well.

The proper way to do what you (probably) wanted is
    chmod -R o+r .??*
This will prevent matching . and ..

> After doing this as root, I lose a lot of right acces every were for
> users.
>     user can't use bash, profile dir, libreadline lib .....

I don't see why your command would have affected write permissions.
The "o+r" means "others get read access".  Maybe you typed
"o-w" instead?  In that case, you'd be revoking write access
to your users for lots of files, and you can fix it by giving
o+w back. (you could just do that command again, but this time
use o+w).

> is there a way to solve this ?
>     using apt-get and force to download all my package and to install
> them again ? (but how?)

I don't think you'll need to do that... unless you want to restore
the permissions to *exactly* what they were before.

Kirk


Reply to: