DEV Community

Euhan Sarkar
Euhan Sarkar

Posted on

you are not the owner so you cannot change the permissions Error in Linux

Recently, I shifted to Linux. After installation, I cannot access my HDD drives because of this error.

The solution to this error is: you have to open the folder where you cannot create/paste any folder/files. Right-click and select the "Open in Terminal" option.

Then, check the permissions using this command:

ls -l
Enter fullscreen mode Exit fullscreen mode

Now, you'll see that only the root can access the file, and you cannot access it. If you want to access it, you have to change the permissions. This is why you need to execute the following command in the current terminal:

cd ..
Enter fullscreen mode Exit fullscreen mode

Now, grant the necessary permissions using this command:

sudo chown -R "desired_username" path_to_folder/folder_name
Enter fullscreen mode Exit fullscreen mode

That's it!

Top comments (0)