[TYPO3-core] RFC #11433: touch(): Utime failed in install tool
Ernesto Baschny [cron IT]
ernst at cron-it.de
Tue Sep 29 15:34:11 CEST 2009
Martin Kutschker schrieb:
> Ernesto Baschny [cron IT] schrieb:
>> Steffen Gebert schrieb:
>>> On Tue, 29 Sep 2009 13:46:01 +0200, Frans Saris <franssaris at gmail.com>
>>> wrote:
>>>
>>>> still wrong variable name: $enableInstallTool => $enableInstallToolFile
>>> grml.. not my day today, really not :D
>>>
>>> Attached v4.
>>>
>>> This time I checked weather modification time is really updated (and
>>> works - if file created by web server user).
>>>
>>> Thanks for your patience ;)
>> I like the idea of solving this, as we also have this "problem" from
>> time to time, and it is just annoying.
>>
>> But the fix is not correct, because checking for "is_writeable" is not
>> really interesting for touching a file. You can only touch a file that
>> you own (or if you are root), so even if the file is "world writeable"
>> it is still not toucheable if it is owned by root (or by the FTP user).
>>
>> So the most simply solution would be to ignore the warning with "@".
>
> if (!@touch($path)) {
> // notify user, log, raise hell - umh - exception, etc
> }
Yes, but this would be the same as we had now (warning). Of course
better that it is not a PHP warning.
Usually I know that this is happening but I don't care, because I am
doing my work in under one hour. So I don't need to see a big fat
warning on top of every page, but instead either don't say anything or
make a notice at the bottom. It is not mission-critical and the only
side effect is that the install tool is locked after one hour again.
And the original problem won't be fixed with this, because "touch"
cannot be made on files that you don't own. So this has to be changed to
fclose(fopen($file, 'a')) if we want it to work also on files the user
has uploaded via FTP (or created as root).
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list