FileManager: saving protected directory: 404

Version 1.572

Bugfix
Finished

The FileManager in DirectAdmin is chrooted, so any files needed at the time of data sending must be pre-loaded. There are various checks to do this, and the logic was wrong when deciding to *not* pre-load data for json_dirs/json_files: https://www.directadmin.com/features.php?id=1878 which is likely where the bug was introduced. The actual functionality was fine, the directory in question would still be protected (likely why it wasn't reported until now) Debug mode would have given you: fynamic(api=0, error=0): text='Directory Protection Settings have been saved.' result='' Command::doCommand(/CMD_FILE_MANAGER) : finished Command::run: finished /CMD_FILE_MANAGER 2019:06:01-03:16:53: *** Unable to read ./data/skins/enhanced/files_user.conf Send::sendFail((null), (null)) Where the lookup of the files_user.conf should have happened in the preLoad, before anything was 'run', not after the run. Based on the error, I'm actually surprised no other Filemanager functions were affected (this was the geneic global pre-load, while other functions make the preload call explicitly. If other areas were affected but not reported (with same 404), then this fix would likely apply to them too (not aware of any). One report came in that creating a zip is also affected.

Interested to try DirectAdmin? Get a 30-day Free Trial!