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')
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.