0

I think there is something wrong. When I do git pull I think my computer is for some reason changing all the file permissions. Here is the output I get:

 create mode 100755 keys/im-stage-x02.pem
 create mode 100644 webroot/app/virtual-tour/virtual-tour.shaders.js
 create mode 100644 webroot/lightmaps/Georges_House/ArmChair_Pillows_002.jpg
 create mode 100644 webroot/lightmaps/Georges_House/ArmChair_Pillows_01.jpg
 create mode 100644 webroot/lightmaps/Georges_House/Barstool_UV_004.000.jpg
 create mode 100644 webroot/lightmaps/Georges_House/Barstool_UV_004.002.jpg
 create mode 100644 webroot/lightmaps/Georges_House/BathTubLarge.001.jpg
 create mode 100644 webroot/lightmaps/Georges_House/BathTubLarge.003.jpg

This is just a small sample. It is literally every new file in repo that I am pulling from. Is this normal? Should I ignore this?

Edit: I am new to Git so I'm not sure if this is normal or not. If not, any ideas of what the problem may be?

  • All the file permissions? Git simply annotates all files with the permissions of these files at the commit. When you clone/pull the file permissions are simply set as well. But git won't touch other parts of your file system... – Willem Van Onsem Jun 23 '14 at 18:49
  • okay so this is normal then? – user3507586 Jun 23 '14 at 18:50
  • Yes, sometimes necessary. Some scripts might check for permissions in order to perform certain tasks. – Willem Van Onsem Jun 23 '14 at 18:51
  • 1
    Note: Git records only two file permissions: http://stackoverflow.com/a/19621116/6309 – VonC Jun 23 '14 at 18:58
  • the very first time I pulled from the repo, all of the file permissions were changed I believe. every file has this permission: -rwxrwxr-x So every single file in the repo is now an executable. will this cause any problems? – user3507586 Jun 23 '14 at 19:04

1 Answers1

0

Git annotates all files with file permissions. So if a user adds some file with 755 access rights, that file will have the same right everywhere. This is sometimes useful since some scripts only process file with writing access, etc.

Apart from the files added to the repository, it will not touch the rest of your file system.

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
  • 2
    Git does not store full file permissions. It only stores whether a file is executable or not, using something that looks a lot like, but isn't, a Unix mode. It uses `0755` for executable files, `0644` for non-executable. You cannot store a `0777` in the repository. – Edward Thomson Jun 23 '14 at 19:43
  • Point taken, but will it not - eventually - add additional permissions? – Willem Van Onsem Jun 23 '14 at 19:53
  • That's a good question; I would suspect not, but I suppose I don't really know. (Your answer is correct, of course, I'm just being pedantic.) – Edward Thomson Jun 23 '14 at 19:56