Search code examples
gitntfschmod

How can I use "chmod" command under the NTFS file system


I wanted to change the file permission when I use "git", but the "chmod" didn't work. How can I use "chmod" command under the NTFS file system?


Solution

  • You can't. See: https://askubuntu.com/questions/11840/how-to-chmod-on-an-ntfs-or-fat32-partition

    The mode is determined by the partition's mount options (you cannot change it via chmod).

    For '755' on files and '777' on directories you would use something like

    sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000 /dev/whatever /mnt/whatever