1

Running Ubuntu 14.04 (Trusty), I have mounted an exFAT formatted USB drive. While attempting to git clone a repo onto it, I've run into the following error:

Cloning into 'rschedule'...
error: chmod on /media/john/John/apps/rschedule/.git/config.lock 
failed: Function not implemented
fatal: could not set 'core.filemode' to 'false'

Cloning the repo onto my computer's local file system works normally. I can also otherwise access the USB drive normally (i.e. read / create files).

Any ideas as to what may be going wrong?

Additional information which is hopefully irrelevant: Ubuntu is running on a Chromebook using crouton.

Edit:

A possibly related question: How do I use 'chmod' on an NTFS (or FAT32) partition?. Unfortunately, assuming it is related, I haven't been able to figure out how to translate that question / answers to my problem.

17
  • Please run sudo chmod a+rwx /path/to/fvat/usb and try again! Dec 12 '18 at 14:34
  • @GeorgeUdosen Thanks! Unfortunately, that command results in the following error: chmod: changing permissions of '/media/john/John': Function not implemented
    – John
    Dec 12 '18 at 14:40
  • ok have a look at these: stackoverflow.com/questions/1580596/… use the git config core.fileMode false version so it's not globally set Dec 12 '18 at 14:42
  • @GeorgeUdosen the git directory is currently remotely hosted on gitlab. Attempting to run git config outside of a git repository is giving me a fatal: not in a git repository error
    – John
    Dec 12 '18 at 14:49
  • 1
    @GeorgeUdosen I think I'm able to get the proper permissions when mounting using sudo mount -t exfat -o rw,auto,user,fmask=0022,dmask=0000,uid=1000,gid=1000 /dev/sda2 /media/john (where 1000 is the user id and group id). Unfortunately, this still doesn't fix the git clone problem (I also tried adding umask=000, no luck). It looks like I was wrong and the How do I use 'chmod' on an NTFS (or FAT32) partition? question is unrelated to this one. Thanks for all your help.
    – John
    Dec 12 '18 at 16:01
0

Assembling from the comments above:

Mounting with

sudo mount -t exfat -o rw,auto,user,fmask=0022,dmask=0000,uid=1000,gid=1000 /dev/sda1 mnt

where mnt is in my home directory thus owned by me and then doing

git -c core.fileMode=false clone ../whatever-bare-repo.git/

seems to work correctly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.