Actions
Task #95203
closedcheckFilePermissions checks file permissions that are not tracked in git
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-09-12
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
For normal files, it checks if they are exactly 644.
That check is too narrow since git does only manage the executable bit for the user. So the actual file permissions are dependent on the system environment.
Just to showcase it:
$ umask 0002 $ git clone git@github.com:typo3/typo3 0002 ... $ ls -l 0002/typo3/README.md -rw-rw-r-- 1 jonas jonas 6611 Sep 12 17:44 0002/typo3/README.md $ umask 0077 $ git clone git@github.com:typo3/typo3 0077 ... $ ls -l 0077/typo3/README.md -rw------- 1 jonas jonas 6611 Sep 12 17:44 0077/typo3/README.md $ cd 0077 && git ls-files -s README.md 100644 4c60da23261803f7f82b2a08b0a88e41bfde6877 0 README.md
Even if file permissions differ, `git status` shows them as unchanged (and that is legit since it really only remembers if a file is +x or -x). The output of `git ls-files -s` is misleading since it "beautifies" it as 755/644.
Actions