mxgross / EasyBackupBundle

Kimai 2 Plugin for easier backups
MIT License
24 stars 6 forks source link

Dubious ownership #59

Closed kevinpapst closed 1 year ago

kevinpapst commented 1 year ago

Can you help explaining this message in the status checks:

fatal: detected dubious ownership in repository at '/var/www/kimai/var/plugins/EasyBackupBundle' To add an exception for this directory, call: git config --global --add safe.directory /var/www/kimai/var/plugins/EasyBackupBundle

This is the directory:

drwxrwxr-x 11 root www-data   4096 May 26 10:53 ./
drwxrwxr-x  4 root www-data   4096 May 26 10:55 ../
drwxrwxr-x  2 root www-data   4096 May 26 10:53 Command/
-rwxrwxr-x  1 root www-data   1827 May 26 10:53 composer.json*
drwxrwxr-x  2 root www-data   4096 May 26 10:53 Configuration/
drwxrwxr-x  2 root www-data   4096 May 26 10:53 Controller/
drwxrwxr-x  2 root www-data   4096 May 26 10:53 DependencyInjection/
-rwxrwxr-x  1 root www-data    448 May 26 10:53 EasyBackupBundle.php*
...

So owner = root and group = www-data. After running chown -R www-data /var/www/kimai/var/plugins/EasyBackupBundle the error went away. Why is the owner root dubious?

mxgross commented 1 year ago

Hi Kevin, this is a git message. I am not throwing it.

It seems to be thrown because of the git submodul (EasyBackup git repos inside of Kimai2 repo)

I had not yet the time to read more about it, but maybe this article explains it: https://medium.com/@thecodinganalyst/git-detect-dubious-ownership-in-repository-e7f33037a8f

kevinpapst commented 1 year ago

Thanks for your answer. That explains it. I was just curious. I mean it looks red like an error and is a bit disturbing, but changing the user doesn't cause any harm, so lets simply chown.