V
V
vitaly_742019-11-04 12:12:02
git
vitaly_74, 2019-11-04 12:12:02

Why doesn't git see file permission changes?

Good afternoon, on the ubuntu 18 machine I go into the directory with the cloned repository, let's say it has access to folders as 777. I want to register 775 for it (sudo chmod -R 775 .), then when I do git status - I don't see any changes - at all . the same hat if I prescribe 755. tell me what am I doing wrong? and how to correct this misunderstanding?
ps I develop on Windows, so I have to set the necessary folder permissions in ubuntu.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lynn "Coffee Man", 2019-11-04
@Lynn

Git does not store file permissions. Rather, it stores only the executable bit of the owner. There are only two modes for git: 755 for executables and 644 for normal files.
https://github.com/git/git/commit/e44794706eeb57f2...

We only really care about the difference between a file being executable
or not (by its owner). Everything else we leave for the user umask to
decide.

In theory, umask is responsible for the rights of the created folders and files, and in all sane systems it is defined as 022 or 002, i.e. directories should have permissions of 755 or 775 by default, but not 777. Dig your ubunta settings, git has nothing to do with it.

I
Ivan Shumov, 2019-11-04
@inoise

And so it will go on forever. Git doesn't know anything about permissions on the file system because it doesn't actually have one. It is necessary to make a deployment script at least with the installation of the necessary access rights

M
Mikhail Osher, 2019-11-04
@miraage

git config core.fileMode

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question