Home | About | Categories | All Tips & Tutorials

What happens when a file is owned by root in Linux Mint

ID: 76

Category: Linux Mint

Added: 23rd of March 2016

Views: 3,744

When a file is owned by the root user, the first thing you will see is a padlock on the file.



You can check the permissions of the file by right clicking on it, clicking properties and then clicking the permissions tab. As you can see ownership of the file belongs to the root user. If we want to be able to write to this file, then we need to change the ownership of this file to our own username.



To achieve this open your terminal and enter the following command, you will be required to enter your password

sudo chown testuser file.txt


After changing the ownership of the file, right click on the file, goto properties and view the permissions tab again. You will now see that you have ownership of the file meaning you can read and write to the file.



The padlock will also disappear from the icon.