You are not logged in.

#1 2024-11-09 12:04:59

testware
Member
Registered: 2024-01-25
Posts: 39

[SOLVED] git clone: Operation not permitted

Hallo,

I have divided my hard disk into 4 partitions
1st one is root directory
2nd one is where I store my data

Now I mount this disk with fstab: UUID=7DF8-380C /mnt/storage exfat async,suid,gid=1003,umask=007

I belong to the group externalstorage
So I can actually do everything.
premisson:
drwxrwx--- 1 root externalstorage 131072 Jan 1 1970 storage/

when i:

git clone https://github.com/helix-editor/helix.gitCloning into 'helix'...
error: chmod on /mnt/storage/tools/file_editter/helix/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'

thanks, if someone can tell me how to solve it

Last edited by testware (2024-11-09 19:40:58)

Offline

#2 2024-11-09 12:15:28

kermit63
Member
Registered: 2018-07-04
Posts: 259

Re: [SOLVED] git clone: Operation not permitted

exfat does not support linux permissions.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Online

#3 2024-11-09 12:36:11

testware
Member
Registered: 2024-01-25
Posts: 39

Re: [SOLVED] git clone: Operation not permitted

Ok, but how can this information help me?
Do you have any idea how I can install it with git clone?
I have the permissions according to ls when I enter ls.

Last edited by testware (2024-11-09 12:37:23)

Offline

#4 2024-11-09 12:41:49

kermit63
Member
Registered: 2018-07-04
Posts: 259

Re: [SOLVED] git clone: Operation not permitted

Do it somewhere else like your home directory, which I presume is a linux-friendly file system (ext3/4, btrfs, etc).


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Online

#5 2024-11-09 12:48:52

testware
Member
Registered: 2024-01-25
Posts: 39

Re: [SOLVED] git clone: Operation not permitted

So ls does not show me the correct file permissions?
How can I see the correct permissions?

edit:
it confuses me, I can read, created, execute files only with git clone it does not work
and cargo build does not work either

Last edited by testware (2024-11-09 12:53:06)

Offline

#6 2024-11-09 14:35:23

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,981

Re: [SOLVED] git clone: Operation not permitted

error: chmod on /mnt/storage/tools/file_editter/helix/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'

chmod can't operate on exfat filesystems and cargo build is likely to face similar issues.

You'll have to choose another filesystem for the data partition.

Last edited by Lone_Wolf (2024-11-09 14:36:12)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2024-11-09 15:46:25

safe049
Member
From: Shanxi,China
Registered: 2024-05-02
Posts: 77
Website

Re: [SOLVED] git clone: Operation not permitted

format your exfat fs to ext4 or ext3 or brtfs etc,it won't work on exfat


std::cout << "I use Arch BTW" << endl;

Offline

#8 2024-11-09 18:55:10

testware
Member
Registered: 2024-01-25
Posts: 39

Re: [SOLVED] git clone: Operation not permitted

Ok, I understand that it won't work on exfat.
But I expected you to explain to me why it doesn't work and maybe there are ways around it, and not just say for the third time that it doesn't work.

format your exfat fs to ext4 or ext3 or brtfs etc,it won't work on exfat

My main file system is ext4.
I want to keep my exFAT because it seems to be compatible with everything without any problems.

Last edited by testware (2024-11-09 18:57:30)

Offline

#9 2024-11-09 19:21:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [SOLVED] git clone: Operation not permitted

testware wrote:

I want to keep my exFAT because it seems to be compatible with everything without any problems.

Except git wink

The problem is git depends upon the ability to set and read permissions.  exFAT has no concept of permissions.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2024-11-09 19:32:52

progandy
Member
Registered: 2012-05-17
Posts: 5,267

Re: [SOLVED] git clone: Operation not permitted

You can try to run your clone with filemode set to false so permissions are not trusted:

git -c core.fileMode=false clone ...
cd ...
git config core.fileMode false

Even if that works, there may be other applications that will have problems.

Last edited by progandy (2024-11-09 19:36:03)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2024-11-09 19:38:17

seth
Member
Registered: 2012-09-03
Posts: 59,084

Re: [SOLVED] git clone: Operation not permitted

Everyone is repeatedly telling you what the problem is, you just don't want to hear it…

So here's some details you probably don't understand:
exFAT is FAT. It's not even a real filesystem let alone a posix one.
https://en.wikipedia.org/wiki/File_Allocation_Table

https://man.archlinux.org/man/core/man-pages/chmod.2.en and https://man.archlinux.org/man/chown.2.en will fail w/ an error and that error stops everything that checks for it.


Würg-a-rounds:
--------------------
Since we recently had this, you can use https://aur.archlinux.org/packages/bindfs to hide the errors, https://bindfs.org/docs/bindfs.1.html#sect5
This is however dumb. There're more limitations to FAT than just the permissions, you eg. also don't get sym- or hardlinks

=> Use a real filesystem.
In doubt create an image file and add an ext4 filesystem there that you can then mount as loop device.
https://wiki.archlinux.org/title/Sparse_file

Edit:

progandy wrote:

Even if that works, there may be other applications that will have problems.

testware wrote:

and cargo build does not work either

Last edited by seth (2024-11-09 19:40:07)

Offline

#12 2024-11-09 19:40:04

loqs
Member
Registered: 2014-03-06
Posts: 18,081

Re: [SOLVED] git clone: Operation not permitted

progandy wrote:

You can try to run your clone with filemode set to false so permissions are not trusted:

git -c core.fileMode=false clone ...
cd ...
git config core.fileMode false

It looks as though the chmod on config.lock is unconditional https://github.com/git/git/blob/v2.47.0/config.c#L3339

Offline

#13 2024-11-09 19:48:06

progandy
Member
Registered: 2012-05-17
Posts: 5,267

Re: [SOLVED] git clone: Operation not permitted

If you mount the FS with the UID of your user set, then chmod might not return an error, but I have not tested that.
https://man.archlinux.org/man/core/man- … 2.en#EPERM

       EPERM  The effective UID does not match the owner of the file,
              and the process is not privileged (Linux: it does not have
              the CAP_FOWNER capability).

Last edited by progandy (2024-11-09 19:48:58)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB