Use the chown to change the ownership and to change rights. use the -R option to apply these rights for all the files inside of the directory too.
Note that both the commands just work for directories too. The -R option makes them also change these permissions for all the files and directories inside of the directory.
For example
sudo chown -R username:group directory
will change the ownership (both user and group) of all the files and directories inside the directory and directory itself.
sudo chown username:group directory
will only change this permission of a folder directory but will leave these files and folders inside a directory alone.
you need to use this sudo to change the ownership from root to yourself.
Edit:
Note that if you use a chown user: file (Note the left-out group), it will use a default group for that user.
Also You can change this group ownership of the file or directory with the command:
chgrp group_name file/directory_name
You must be a member of a group to which you are changing ownership to.
You can find a group of the file as follows
# ls -l file
-rw-r--r-- 1 root family 0 2012-05-22 20:03 file
# chown sujit:friends file
User 500 is just a normal user. Typically user 500 was the first user on the system, recent changes (to /etc/login.defs) have altered the minimum user id to 1000 in many distributions, so typically 1000 is now the first (non root) user.
What you may be seeing is a system that has been upgraded from the old state to the new state and still has some processes knocking about on uid 500. You can likely change it by first checking if your distro should indeed now use 1000, and if so alter the login.defs file yourself, renumber the user account in /etc/passwd and chown/chgrp all their files, usually in /home/, then reboot.
But in answer to your question, no, you should not be worried about this in all likelihood. It'll be showing as "500" instead of a username because o user in
/etc/passwd has a uid set of 500
that's all.
Also, you can show your current numbers using id I am willing to bet it comes back as 1000 for you.
Want to be a Linux expert? Come and join this Linux course