简体   繁体   中英

git clone Permissions 644 on master, 777 on clone

  • Running dual-boot (Ubuntu 14.04 LTS/Windows 10)

  • Booted into Ubuntu

  • When running "git clone" in Ubuntu partition location, cloned file permissions are correct (ie 644 for files and 755 for directories)

  • When running "git clone" in Windows partition location, cloned files and directories permissions are all incorrect: 777

example:

Ubuntu partition:

cd /home/myuser/clonehere/
git clone https://github.com/myrepo/myrepo.git
result: /home/myuser/clonehere/
  files=644, directories=755 CORRECT

Windows partition:

cd /media/myuser/Windows/Users/Public/Documents/clonehere/
git clone https://github.com/myrepo/myrepo.git
result: /media/myuser/Windows/Users/Public/Documents/clonehere/
  files=777, directories=777 INCORRECT

Ubuntu partition result:

drwxr-xr-x  8 stupidscript stupidscript  4096 Sep 18 14:31 .git
-rw-r--r--  1 stupidscript stupidscript    68 Sep 18 14:31 .gitignore

Windows partition result:

drwxrwxrwx 1 stupidscript stupidscript   4096 Sep 18 14:36 .git
-rwxrwxrwx 1 stupidscript stupidscript     68 Sep 18 14:36 .gitignore

Tried setting umask 0022 before clone and adding /etc/wsl.conf, no change.

Thank you for your help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM