?
avatar PhilETaylor
PhilETaylor
25 Apr 2021
  • Assuming a completely READ ONLY file system on a server that needs FTP to write/move/delete files...
  • Assuming Joomla 4 is going to retain the FTP Layer
  • Assuming "retaining the FTP Layer" means that Joomla 4 should be able to FULLY operate in a READ ONLY file system only accessible by FTP by providing of FTP Credentials
  • Assuming the providing of those FTP Credentials remains OPTIONALLY SAVED in Joomla Global Config, and PROMPTED FOR at the moment of need, if not saved in the Joomla Global Config

In Joomla 3, we allowed the FTP Credentials to be optionally saved to Joomla Global Configuration - and when they were needed (Joomla update, Extension install) they were prompted to be entered.

In Joomla 4, the CMS has more features that require - by default - access to write/delete/rename to the file system. If we continue to allow FTP Credentials to be OPTIONALLY SAVED to Joomla Global Configuration then the following features cannot work if the FTP Credentials are not present in the Global Configuration and a solution needs to be found to prompt for the credentials at the point of need (OR we change Joomla 4 to MANDATORY save the FTP Credentials into Joomla Global Config, if on a read only filesystem)

Obviously some of these tasks CANNOT prompt for credentials "at the point of need" and therefore the only logical conclusion is to (Option 1) make storing the FTP Credentials MANDATORY on a read only file system - or else the aim to make Joomla work perfectly on a read only file system cannot be achieved - and we would need to (Option 2) fall back to big error messages, thus defeating the whole point of the FTP Layer being a thing.

The following Joomla 4 features need testing in FTP Mode, with NO SAVED FTP CREDENTIALS in Joomla Global Configuration, to see how they work, what errors they generate, if they prompt for FTP credentials, and if they are actually useable when he file system is read only and only accessible by FTP.

You can replicate the full list below by setting your file system to be READ ONLY. In Docker using docker-compose.yml you can append :ro to your folder mounts to achieve this.

This is also an attempt to record all the areas of Joomla 4 that require file write access.

  • The writing of autoload_psr4.php namespacemap
  • All of the issues mentioned in the Summary at #33251 need checking as to what happens when the FTP Credentials are MISSING from the Joomla Global Config (As saving credentials is optional)
  • Saving the Joomla Global Config
  • Creating Template Overrides in Template Manager
  • Template Manager cannot rename, save or delete files, it says "some features may not work" well the point of the FTP Layer is that they SHOULD work.
  • Joomla Update restore_finalisation use of unlink in AKFactory
  • Saving modifications to template files
  • Media Manager file uploads/deletes/renames
  • Media Manager Image changes (Crop/rotate/scale etc)
  • Filesystem Caching layer
  • Debug Mode toolbar cache files (vendor/maximebf/debugbar) uses file_put_contents
  • Error logging to file (Joomla logs)
  • Log Rotation Plugin moving files
  • UpdateModel.php if FTP Write fails, it then attempts to direct access with file_put_contents
  • CLI Database export/import
  • Use of Joomla\Archive package which uses the Joomla\Filesystem and not Joomla\CMS\Filesystem packages.
  • CLI DaemonApplication use of unlink and write on a pidFile
  • PHPMailer use of the file system when signing emails (Joomla doesn't sign emails, but the feature is exposed so 3pd can)
  • "Update Structure" button on the Database page (Used to be "fix") cannot run as it deletes files.
  • Extension installation from URL says "Unable to detect manifest file." and doesn't prompt for credentials when trying to install.
  • Extension Upload and Install doesn't work when no FTP credentials stored, not prompted for credentials.
  • Languages: Edit Override cannot save the override files, not prompted for credentials, gives bad error message with no actual error message "Save failed with the following error:"

** Warning: This list was compiled before coffee, it is possible its a very incomplete list! **

avatar PhilETaylor PhilETaylor - open - 25 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Apr 2021
avatar PhilETaylor PhilETaylor - edited - 25 Apr 2021
avatar PhilETaylor PhilETaylor - change - 25 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - change - 25 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 25 Apr 2021
avatar PhilETaylor PhilETaylor - change - 25 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 25 Apr 2021
avatar joomdonation
joomdonation - comment - 25 Apr 2021

If the decision is still keep FTP layer, then +1 for make storing the FTP Credentials MANDATORY from global configurable and remove options to enter credentials on all other places. When FTP is enabled in global configuration, we will validate and make sure the the entered Credentials is valid before saving it to configuration.php. However I do hope that we will remove the FTP layer to save us from having to do this maintenance works.

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

Following the projects decision to remove the FTP Layer from Joomla 4 - this can now be closed.

avatar PhilETaylor PhilETaylor - close - 30 Apr 2021
avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-30 10:35:54
Closed_By PhilETaylor

Add a Comment

Login with GitHub to post a comment