In traditional Unix permissions, a file or folder can only be owned by one user. When you do
chown -R myuser, you set
myuser as the owner of that particular file.
When doing an
ls -l, the two names you see are the owner and the group the file belongs to, e.g.
myuser being the owner and
root being the group. Please read Unix Permissions for a little more info.
If you want the folder to be owned by root again, just do a
chown -R root on it.
If you want a user to have full permissions on a folder, here are some possibilities you have:
- Let the user own the folder with
chown -R myuser, and make sure the folder has read, write and execute access for that particular user, e.g. with
- Add the user to a group that has read, write and execute access on the folder, e.g.
useradd -G root myuser, where
root is the name of the group, and
chmod g+rwx. You also need to change the group of the folder with
chgrp -R root for this to work.