[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



> 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.

Just the directories? Try this (as root)

cd /home
for i in *
do
chown $i $i
done

-- 
    Mike Wescott
    wescott sc rr com



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