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.
Just go to the directory you want to change:
and change the permission using the
chown
command:Where
userName
is the username andcodeigniter
is the folder's name.When you do an install you have several directories. Everything in
/home/user/
can be changed to youruser
. If youchown
the others your system will break. And when you chown you need to make sure youchown
to theuser
and NOT just some name you choose. It will be the same name as the folder under/home/
. Do not change either permissions or ownership of anything but files under/home/user/
.The command will change the user and the group to the same at the same time.
The below is for individual file:
For an entire directory it will be:
For recursive (i.e files and folders inside a folder):
Note:
user
is, if you dopwd
under any Documents, you will see the path:/home/jhon/Documents
. Here user isjhon
.