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.

During the copying of certain program folders to my /opt directory I mistakenly changed the permissions of the /opt directory.

At the moment I (current user) can simply write/copy files to the /opt folder without appending sudo.

I need instructions to revert it back to the default as I've got some really important programs in that folder and Google Chrome has stopped working since that error occurred.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

My permissions for /opt are drwxr-xr-x (with ownership root:root). That's the default.

You can set this ownership and permissions (regardless of how it's set currently) with:

sudo chown root:root /opt
sudo chmod 0755 /opt

If you changed the permissions of files and folders inside /opt as well, then a good solution might be more complicated. (You can add the output of ls -lR /opt to your question, to show this.)

share|improve this answer
    
Thanks a lot. Permissions back to normal, though it did not seem to apply recursively.ie. to certain files within sub-folders of /opt directory.eg i had to reclaim certain google chrome files for root before it began working again, even though i set the topmost /opt directory as belonging to root –  xupv5 Jul 29 '12 at 3:25
add comment

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.