0

I am getting this error from git:

fatal: detected dubious ownership in repository at '/run/media/marcel/Хранилище/Dev/Desktop/SimpleAccent'
To add an exception for this directory, call:

        git config --global --add safe.directory '/run/media/marcel/Хранилище/Dev/Desktop/SimpleAccent'

Here's the ls -la for my directory:

drwxrwxrwx. 1 root root 4096 июл 30 18:05 ./
drwxrwxrwx. 1 root root 4096 мая 25 10:57 ../
drwxrwxrwx. 1 root root    0 июн 14 19:03 config/
drwxrwxrwx. 1 root root 4096 июн 15 16:55 .git/
-rwxrwxrwx. 1 root root 3115 июн 16 15:53 .gitignore*
drwxrwxrwx. 1 root root 4096 июл 30 18:11 .idea/
drwxrwxrwx. 1 root root 4096 июн 15 16:46 lib/
-rwxrwxrwx. 1 root root 1065 мая 25 11:22 LICENSE*
drwxrwxrwx. 1 root root    0 июл 28 12:27 logs/
-rwxrwxrwx. 1 root root    0 июл 28 12:53 nohup.out*
drwxrwxrwx. 1 root root    0 мая 28 12:18 platform/
-rwxrwxrwx. 1 root root 1436 июл 15 13:50 README.md*
drwxrwxrwx. 1 root root    0 июл 28 12:27 scripts/
drwxrwxrwx. 1 root root    0 июн 16 20:06 setup/
-rwxrwxrwx. 1 root root 2620 июл 30 18:05 simpleaccent.py*
drwxrwxrwx. 1 root root 4096 июн 15 14:08 _util/
drwxrwxrwx. 1 root root    0 июн 14 19:46 .vscode/

They are all root, my user is marcel.

I do sudo chown -R marcel:marcel . while in the directory, but the owner is still root. I try sudo chown -R marcel . ; sudo chgrp -R marcel ., but it's none the better.

How to make chown work?

Specs, if that could matter

marcel@fedora 
------------- 
OS: Fedora Linux 38 (KDE Plasma) x86_64 
Host: MS-7D18 2.0 
Kernel: 6.4.4-200.fc38.x86_64 
Uptime: 46 mins 
Packages: 2015 (rpm), 13 (flatpak) 
Shell: bash 5.2.15 
Resolution: 1920x1080 
DE: Plasma 5.27.6 
WM: kwin 
Theme: [Plasma], Breeze [GTK2/3] 
Icons: [Plasma], breeze-dark [GTK2/3] 
Terminal: tmux 
CPU: 11th Gen Intel i5-11400 (12) @ 4.400GHz 
GPU: NVIDIA GeForce RTX 3060 Lite Hash Rate 
Memory: 5712MiB / 15875MiB 
9
  • 1
    No error messages from the chown and chgrp invocations? What is the filesystem type this directory is on? The "all permissions" are also strange. If not explicit set it give some FAT vibes. The /run/media/*/Desktop/ also indicates some shared stuff. Commented Jul 30, 2023 at 11:56
  • 4
    chown doesn’t work as you expect if the filesystem is FAT or NTFS. In these cases the ownership is set by the way you mount the partition, either in fstab or by the mount command used Commented Jul 30, 2023 at 12:34
  • Moreover the directory is mount in /run tree which is not good place for mount remote/portable media Commented Jul 30, 2023 at 12:48
  • 1
    @RomeoNinov mounting external disks in /run/media/<user> is common in some DEs these days. Commented Jul 30, 2023 at 13:26
  • 1
    See What does a dot after the file permission bits mean and What does the dot at the end of the permissions in the output of "ls -lah" mean?. Run ls -Z or getfacl -Rpt <dir> to check the security context of your files. Commented Jul 30, 2023 at 13:31

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.