git deploying project - file permissions - (chmod)

随声附和 提交于 2020-01-28 06:49:31

问题


I'm deploying my project with git to a remote server using a post-update hook. More specifically I'm following these steps. Everything on my local copy has the right permissions, however after deploying with git push production, files that are set to 777 change in the remote server to -rwxr-xr-x

I've added to both (local/remote) .git/config the core variables filemode = false and I've changed as well my umask in /etc/profile to 0002

Any ideas why it keeps changing the mode of files? Thanks


回答1:


The core.filemode variable is only used when files are indexed. When git checks out files, the stored mode is used unconditionally, and files can only have a mode of 644 or 755. Modify your post-checkout hook to chmod the files.



来源:https://stackoverflow.com/questions/6210116/git-deploying-project-file-permissions-chmod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!