Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to access my /opt/ folder. I have found the following commands for giving access permission.

I am not sure what is the purpose of this commands, which one is the better to use it to maintain security and access permission both.

I want to understand the number system within this command.

sudo chmod 755 -R /opt/

sudo chmod 755 /opt/

sudo chmod 775 /opt/

sudo chmod 777 /opt/

I didn't know these commands, so what I use to do previously was gksudo nautilius then:

Right click > change the owner from root to current user group

Now I have found the chmod command I would like to better understand how this command works and how best to implement it.

share|improve this question

migrated from stackoverflow.com Aug 12 '12 at 13:22

This question came from our site for professional and enthusiast programmers.

did you try man chmod ? or simply google: chmod –  alfasin Aug 11 '12 at 4:05
@alfasin : No i have not ....wait i will try –  user1201239 Aug 11 '12 at 4:09
These commands are absolutely the wrong solution. The proper solution is to use sudo for the operations which require administrator privileges. If you don't have sudo access, obtain it. –  tripleee Aug 11 '12 at 15:54
@tripleee : I am learning commands as I am going in deeper with ubuntu ..found it amazing to use !!! have started looking in to help documentation of ubuntu... hope i will make it soon –  user1201239 Aug 11 '12 at 17:49

2 Answers 2

Thanks but I found a good link for the answer


do not know why people gave me negative voting for the question .As newbie to ubuntu i guess this was the question where I guess everyone get stuck which I learnt while searching on google.

First time I prefered not to google and ask stack to expect best answers.

But thanks atleast to alfasin who gave some thing which i did not know.

share|improve this answer
you can accept your own answer. And always google first; the list will usually be chock full of answers from stack exchange. –  UnlimitedInfinity Feb 28 '14 at 15:10
  1. Please open nautilus as root and access the files/folder.
  2. To change the ownership of the folder please see this thread: http://askubuntu.com/questions/6723/change-folder-permissions-and-ownership This will help you.
  3. Please don't use 777 - this would kill your cat.
share|improve this answer
chmod 777 is never an option, use groups. –  Shadok Nov 14 '12 at 17:25
I'd change should to would or could ;-) –  miniBill Mar 11 '14 at 5:39
@miniBill I've edited :D –  Nikhil Mar 11 '14 at 6:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.