I cannot access any folder in my pc. It shows me You do not have the permissions necessary to view the contents of ..
But I can access using sudo nautilus. I feel bored to type it frequently. How can I access my folder without any permission? I partitioned my home into 4 partition.
- 39
1 Answers
Use the command
chown -R yourusername /home/yourusername
What this does is takes ownership (for your user account) of all files and directories within your home directory.
You inherently cannot access some files and folders via your user-specific Nautilus. To access those you must either take ownership or change permissions of them, or use gksudo or sudo.
To read/write/execute certain files/folders, use the chmod command.
chmod -R (permissions)
The permission can be calculated by this:
Execute by user is 100. Execute by group is 010. Execute by all is 001. Write by user is 200. Write by group is 020. Write by all is 002. Read by user is 400. Read by group is 040. Read by all is 004.
Therefore, we will use
chmod -R 700
You, the owner, can read, write, and execute.
Be careful what and how you chmod! Giving certain permissions to all groups and users can be very unsafe!
- 2,831