Cannot create a directory? I have nginx setup on ubuntu and I need to mkdir that I can git clone into. Unfortunately, I do not have permission to do so.
I'm logged in as ubuntu and the /var/www is owned by www-data. What would be the solution here to create a folder?
Note: chmod 777 is not the solution.
Do you have sudo permissions? Or are you root?
sudo -u www-data mkdir foobar
//or
sudo -u www-data git clone [email protected]
@Sinnbeck thanks - that makes the directory, but I am unable to git clone, as ubunutu has access to the ssh key.
Any ideas how to make this all work?
@panthro you can either make a group that both are part of (www-data for instance), or change nginx to run as the ubunutu user
@Sinnbeck thanks should ubuntu user be part of www-data or is that a security risk? Should I just set up a generic panthro user instead? Then create ssh keys for panthro user?
make sure ubuntu owns the folder that you are trying to make the new folder in.
You can then change ownership of the new folder to www-data once you have cloned the project
Please sign in or create an account to participate in this conversation.