[Typo3-dev] calculation and display of filepermissions in filelist

Wolfgang Klinger wolfgang at stufenlos.net
Sun Jun 20 17:05:04 CEST 2004


 *hiya!*

 On Fri, 18 Jun 2004, Kasper Skårhøj wrote the following:
> Yes, could be interesting! All my files in the Filelist module also have
> "RW" but can be edited though. I didn't find it that important to fix so
> I didn't go into it. if someone could fix this bug to be
> cross-platform/safe_mode compliant that would be a great help to avoid
> confusion for users.

 Hmm, after inspecting this a little bit I came to the conclusion that
 it's not possible to make this work on a broad range of setups.
 (with the current code!)

 Unless you use suExec you'll always get root's values with getmyuid
 instead of the uid of the apache user specified in the apache conf file!

 I wonder why you don't use "is_writable" and "is_readable"?
 (they work reliable, don't they?) And it works for directories too.

----------
function getTotalFileInfo($wholePath) {
 // -----------8<------------- snip -----------------------
    $info['writeable'] = is_writable($wholePath);
    $info['readable'] = is_readable($wholePath);
}
----------

 bye
 Wolfgang







More information about the TYPO3-dev mailing list