We came across an interesting issue. When running importImages.php as root, any subdirectories created in the images directory by this process (php running as root) are owned by root and use its umask. This is as it should be... however, if someone tries to upload an image through the wiki, and the hashing algorithm collides with a subdirectory created by root, it, of course, cannot import the image.
I have tried using
runuser -l apache -c "php importImages.php /tmp/toload" but this fails with the message
This account is currently not available (as it should. no one can log in as the apache user for security reasons).
I have considered making an extension "Upload Image Folder" that would essentially do the same thing, but under the apache thread, but before I go to that effort, is there something I am missing about running the existing maintenance script and having the subdirectories created as apache:apache instead of root:root?
Thank you in advance for your advice
Cordially,
Mark D Henning.