Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

while trying to install XAMP from a tar file using the command: tar xvfz xampp-linux-1.7.7.tar.gz -C /opt, I get the following message: Cannot mkdir: Permission denied

Where and how do I set permissions?

share|improve this question

/opt is owned by root(admin user), you would need to change the owner to you, or just use the sudo command.

to change ownership use chown

sudo chown username:username /opt

but it would probally be esier for you to use the command with sudo precceed to it

sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

nautilus allows to change ownership as well, but youll need to use nautilus as root

gksudo nautilus /

then right click on opt go to properties, then go to the permissions tab, and change as neccessary

changing file permsioons can also be done with chmod

for any more information with these commands, try using the man manual pages by using man followed by the command, you can also use the info command as well.

share|improve this answer

Your Answer


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.