Can't create repository on ext usb drive


I am using a raspberry pi 4, image and a USB extFat 250GB HDD. Because of the reduced internal memory space I am mounting an external HDD to ‘/m edia/gogsData’.

Installation and WebUI are working fine and I changed the ‘Repository Root Path’ to ‘/media/gogsData’.

The problem I encounter is that as soon as I try to create a repository the following message web message shows up


An error has occurred : initRepository: InitRepository: exit status 128 - error: chmod on /media/gogsData/benun/test.git/config.lock failed: Operation not permitted fatal: could not set ‘core.filemode’ to ‘false’

Application Version:

in the ‘media/gogsData’ I see a created folder with the correct username but nothing more.

I already tried to change the chown via

$ sudo chown -R git:git /media/gogsData/

but strangely I can’t do that

‘chown: changing ownership of ‘/media/gogsData/benun’: Operation not permitted’

changing the folder chmod to

sudo chmod 777 /media/gogsData/


sudo chmod 776 /media/gogsData/

is not solving the problem.

Any other suggestions?

Many thanks in advanced for any help!

With best regards,


I solved the problem by myself.
According to’ ->
chown etc does not work with NTFS or FAT formatted drives.

Therfore I formatted the drive to ext4. After

$ sudo chown -R git:git /media/gogsData/

I was able to create repositories.

I hope that will help some other people with the same problem.
Have a great day.