Clément Baconnier
Clément Baconnier

Reputation: 6068

gitkraken fails to access www-data files

This a fresh ubuntu setup, maybe I miss something. I cloned a project I was working on with Laravel and did the permissions folders.

$ cp .env.example .env
$ composer install
$ sudo chown -R www-data:www-data ~/Projects/my-project/storage
$ sudo chown -R www-data:www-data ~/Projects/my-project/vendor
$ sudo chown -R www-data:www-data ~/Projects/my-project/boostrap/cache

A this point, everything works, except git for theses 3 folders. Since git is not a www-data user, I have added my user "clement" to the www-data group

$ sudo usermod -aG www-data clement
$ groups clement
clement : clement adm cdrom sudo dip www-data plugdev lpadmin sambashare

Now, I can work without any problem with git in command line

clement@clement-ubuntu:~/Projects/my-project$ touch storage/test
clement@clement-ubuntu:~/Projects/my-project$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        storage/test

nothing added to commit but untracked files present (use "git add" to track)

However, Gitkraken which's also running under "clement" still act like the user is not a part of the www-data group.

It doesn't see the file storage/test and try to delete all the .gitignore under storage and bootstrap/cache since it doesn't see them

I have already reinstalled gitkraken and re-cloned the project but the problem still occure.

Upvotes: 2

Views: 616

Answers (1)

Cl&#233;ment Baconnier
Cl&#233;ment Baconnier

Reputation: 6068

I got an answer from the support and now it works:

Thanks for reaching out to support! It looks like GitKraken needs the Owner of the file to be the user that is running GitKraken. Would it work to use clement:www-data for the owner permissions?

$ sudo chown -R clement:www-data my-project

Ryan from GitKraken, if you read this, thank you again!

Upvotes: 1

Related Questions