1

am using Ubuntu Server 20.04 and I'm having permission issue while running a script.

Steps taken:

cd /opt/
sudo git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git A
sudo ln -s /opt/A/sqlmap.py /usr/bin/1

Issue:

1 --update

Output:

[22:31:53] [ERROR] update could not be completed ('fatal Unable to create opt A git index lock Permission denied')

image

How can i fix that without running sudo 1 --update each time ? do i need to change location or anything else?

UPDATE:

I've used the following to fix the issue but i would like to confirm if that's the correct approach.

sudo chown -R $USER:$USER /opt/A

Thanks in advance.

Waiting for your feedback.

1 Answer 1

1

Try changing the permissions to /opt then making sure that A and all of its contents are owned by you.

sudo chmod 775 /opt
sudo chown -R $USER:$USER /opt/A

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .