Ubuntu: Permission denied on Git folder

So recently I had some trouble using or modifying a project I checked out from my Git-repository.

It took me a while before I had figured out what the problem was (longer that it should have), that’s why I’m sharing it here.

At first I tried giving myself the right permissions on the repo folder, without much progress, some things worked while other kept giving my errors.

The solution that finally fixed the problem for me, was making myself owner of the folder so no chmod but chown was needed to get this fixed.

sudo chown -R user /path/to/local/repo

Some explanation:

  • the chown command changes file owners
  • -R stands for recursively (includes al subfolders and files)
  • with “user” being the person you are logged into your system

Hopefully this helped you out aswell, or at least pointed you in the right direction.

Tagged with: , , , , , , ,
Posted in Development, Linux, Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: