showkey
showkey

Reputation: 320

Permission denied for git init

git init can't run in /var/www/html/wp I do as Ding says in the web.

usermod -a -G www-data username

usermod -a -G www-data debian8

enter image description here

enter image description here It takes no effect at all.
Why can't I run git init in my /var/www/html/wp?

Upvotes: 0

Views: 17388

Answers (2)

Debbie V
Debbie V

Reputation: 324

You can also change the umask in your .profile in your home directory:

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
# umask 022
umask 002

What this does is set the initial perms for any new directories or files that you create.

New directories will get 775 (drwxrwxr-x), vs default 755 (drwxr-xr-x). Files will get 664 (-rw-rw-r--), vs default 644 (-rw-r--r--).

Depending on your situation, you may want to change it back after running git init.

Upvotes: 1

showkey
showkey

Reputation: 320

sudo chmod -R g+w /var/www/html/wp

Upvotes: 2

Related Questions