Ubuntu – change ownership of all files from root to user


i'm new to Ubuntu and was wondering if there is a way to remove the ownership of all files and scripts from root to user even if i have to re-install Ubuntu?
i do know about the command 'chown -v username foldername', although it doesn't work on all files.

Best Answer

Just go to the directory you want to change:

cd /opt/lampp/htdocs

and change the permission using the chown command:

sudo chown userName -R codeigniter

Where userName is the username and codeigniter is the folder's name.

Related Question