Ubuntu git allowed permission to use

I think I have a problem with my rights.
I have almost new Ubuntu 14.04 installed and just configured my vhost to display my little html project. The new site has no problem working properly in Firefox.

But now I want to initialize a new git repository and failed.
When I type inside / var / www / html

git init  

      

I am getting this error

/var/www/html/.git: permission denied 

      

My / var / www has the following permissions:

drwxrwxr-x 13 www-data www-data 4096 Jan  4 18:48 html/ 

      

When i type

ssh-add -l  

      

my id_rsa (RSA) is displayed correctly.

I don't know what else I am missing.: - (

+3


source to share


1 answer


Folder /var/www

permissions only allow user www-data

and group members to write files www-data

. You can add yourself to the group www-data

with the following command

usermod -a -G www-data your_username

      



If you are logged in via SSH, you need to log out and then re-enable.

This should allow you to write files to that folder without giving everyone write permission. This is not a good idea on a production server.

+1


source







All Articles