Actions
Bug #14154
closedt3lib_div::writeFile() changes permissions without need
Start date:
2004-05-11
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
3.6.2
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Playing around with the filelist module, I discovered the following bug:
If a file has been edited via filelist, the permissions are changed to 775 after saving (or whatever given in ['TYPO3_CONF_VARS']['BE']['fileCreateMask']).
The editor uses t3lib_div::writeFile(), but this function does not check if a file did exist before writing and so does not preserve its permissions.
A patch to fix this is attached as diff -urN
1) open a shell, browse to a directory in /fileadmin
2) create a testfile, e.g. test.txt and spend some 664 permissions.
3) go to filelist module, browse to the directory, edit the testfile and save it.
4) go back to shell and compare file permissions of the edited file (ls -l).
(issue imported from #M76)
Files
Actions