2

What I want is to move my development from Linux to Windows, using Docker's Tools (Kinematik, Machine, Compose). I'm still developing web applications supposed to be running on Linux in production, of course.

Easy part is to install Tools and clone a repo. This way repo with a source code is in Window's host file system, but running in Linux via containers.

Difficult part is when I edit files, save it back and commit via git, the file's permission is 0777 and it doesn't respect existing (before editing) permissions.

How it could be sorted?

  • 1
    Not a Linux guru, but seem a normal behavior from git, as seen there too; http://stackoverflow.com/questions/7163736/how-to-preserve-the-file-permission-in-git – yagmoth555 Sep 16 '15 at 23:15

2 Answers2

0

Change you umask settings, typically umask should be 022 (so files are 644 and folders are 755)

For SFTP change it here:

How to put desired umask with SFTP?

Jacob Evans
  • 7,636
  • 3
  • 25
  • 55
-1

You may find some ideas here https://stackoverflow.com/questions/6476513/git-file-permissions-on-windows-7 None of them seem exactly what you are saying, but taken together, you may find something that works for you.