Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How do I get permissions to edit system configuration files?

I have files kept under the folder /opt/. When I am trying to edit the files, could not because the permission is denied.

How to give the permission?

share|improve this question

marked as duplicate by Jjed, Uri Herrera, James Mar 15 '12 at 13:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

sudo or gksudo to act on them as root.
chown user:group to change ownership.
chmod 'permission in octal' to change permission type for user:group:everyone
su user to switch to an appropriate user.

I frequently put things in /opt that belong to multiple users, but are pretty portable and not in repos. I don't think saying 'use sudo' is necessarily right for '/opt' specific questions.

share|improve this answer

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