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

Re: [K12OSN] Linux Directory Permissions -- Help me clean up my mess



Mark Cockrell wrote:
> Hello all,
>    I accidentally changed the permissions of all the directories in
> /home to be owned by "root."  can someone tell me how to change the
> "owner" back to the individual user.  Perhaps a bash script (which I
> know nothing about) that will scan /home and change the the owner to the
> name of the directory?  Example:  directory aabrown should be owned by
> aabrown.  Any help would be appreciated.

$ cd /home
$ for each in *; do chown -R $each $each; done

Salt to taste!

-- 
Dan Young <dan_young parkrose k12 or us>
Parkrose School District


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