Project

General

Profile

Actions

Bug #14154

closed

t3lib_div::writeFile() changes permissions without need

Added by Steffen Müller over 20 years ago. Updated about 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
-
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

0000076-patch_writeFile.diff (937 Bytes) 0000076-patch_writeFile.diff Administrator Admin, 2004-05-11 22:08
bug_76.diff (1.18 KB) bug_76.diff Administrator Admin, 2005-10-20 14:19

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #14153: t3lib_extfilefunc::func_copy() does not set file permissions properlyClosedMichael Stucki2004-05-11

Actions
Actions

Also available in: Atom PDF