1. Download the program code in Linux (make sure you get the correct file attributes)
2, in the Windows code, for the existing code, do not change the file permissions, such as the original 755, change the contents of the file is still 755 after the file, if you want to create a new file, the default is 644, other permissions, you need to set up in Linux with chmod
3, changes completed directly in the Windows upload, uploaded to the server file permissions consistent with the Linux upload.
1th, nothing strange, the file permissions are lost when you download the code with GIT on Windows
For the 2nd, it needs to be set in Smba, where the/etc/samba/smb.conf of these lines can be canceled to resolve the problem that the modified file does not change its permissions.
[CPP] View plain copy
- Map archive = No
- Map hidden = no
- Map Read Only = no
- Map system = No
- Store DOS attributes = yes
For the 3rd, but also I spend the longest time, it is in the Tortisegit settings, so that upload files only upload file content, ignore the file permissions, the specific settings are as follows,
git config--global core.filemode false
git config core.filemode false
These two lines of code I toss for a long time, later to understand,
As shown in the following:
After clicking Settings:
Click Edit local Git/config and edit global Gitconfig
Add Filemode=false in the edit box to
Because my edit local may have been edited, and then Gray, if you can point it in, then remember to add the corresponding code
Using Smba to implement write programs on Windows, run on Linux