chown recursively changed permissions
By using {.,}*
, you included both ./
and ../
. Along with the -R
option, your chown
call was about to browse your entire filesystem (and others, possibly mounted), going through ../
. With other commands, this little mistake can be quite deadly, but believe me, you're not the first, and you won't be the last...
Since this operation is quite heavy, your chown
call hanged a while, as it had a lot of files to process. I'd suggest you go back to the directory where you made the call, and go back progressively to /
to see what changes were made. You might be able to apply a quick fix doing:
chown root:root /* # Set ownership to root for all directories in /.
chown you:yourgroup /home/you -R # Take your home back.
On Ubuntu, the /home
directory is given to the first (admin/sudo) user registered on the system. If you're the only user, you might want to do:
chown you:yourgroup /home -R
However, a simple chmod 755
on /home
is enough, even if it belongs to root.
Having a quick look directly at /
(including the root permissions themselves, ls -ld /
) would also be a nice place to start. I suggest you make sure that /
belongs to root, with a 755 permissions set.
If you used chown
to set a very specific ownership (a user other than you or root, a rare group, ...), you may want to use find
to look for chown
-ed files.
find / -user {username}
find / -group {groupname}
Unfortunately, there is no such thing as undo
for what your did. Linux doesn't naturally keep tracks of these "casual" operations.
For more information on what you were trying to achieve, have a look at this SuperUser question.