Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have accidently unlocked a system file with the command:

sudo chmod 777 /opt

Does anyone know how to undo this action or to lock it again?

share|improve this question
    
which system file? –  user8290 Dec 26 '12 at 21:07
    
the /opt/ directory –  Abood Mount Dec 26 '12 at 21:08
    
Thank you very much this worked. –  Abood Mount Dec 26 '12 at 21:13
    
No problem. Can you mark it accepted please? (toggle the check) –  user8290 Dec 26 '12 at 21:15
2  
Did you just make this change to the /opt folder, or did you make it recursively so it affected the /opt folder and all its contents? If you don't know, please describe, with as much detail as possible, how you made the original change. –  Eliah Kagan Dec 26 '12 at 21:45

1 Answer 1

up vote 2 down vote accepted

Ownership and permissions:

sudo chown root:root /opt; sudo chmod 0755 /opt
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.