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

I am following this guide.

I am doing this:

cd /opt
git clone
cd metasploit-framework

When I am doing :

git clone

I am getting the following error :

fatal: could not create work tree dir 'metasploit-framework'.: Permission denied
share|improve this question
Link for the following guide is not here. – user224082 Dec 25 '13 at 9:30
up vote 0 down vote accepted

Run the following in the terminal to open a new terminal session as root, so that you get permission to run the commands:

sudo su
share|improve this answer

You are trying to git clone into the /opt directory and don't have privileges.


sudo git clone

Alternately git clone into your home directory then if you need to make the executable or install just invoke your superuser privileges then with sudo.

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.