$path = "/path/to/folder"; $t3lib_div::fixPermissions($path, "775", "664");
$file = "/path/to/file.txt"; $t3lib_div::fixPermissions($file, "777", "");Here, the function sets permissions for the specified file to "777", which means that it can be read, written, and executed by anyone. Package library: The t3lib_div fixPermissions function is a part of the TYPO3 CMS library, which is included in the TYPO3 Core package.