Support

Admin Tools

#12968 Clean tmp directory fials

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Thursday, 19 July 2012 13:17 CDT

earthrat
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? YES
Have I searched the tickets before posting? YES
Have I read the documentation before posting (which pages?)? YES
Joomla! version: 2.5.6
PHP version: 5.3.8
MySQL version: 5.1.63
Host: Apache/2.2.22
Admin Tools version: 2.2.9

Description of my issue:

I tested this on three sites and it is consistent. Admin Tools 2.2.9 when using the Clean Temp-Directory tool it does not remove the new updates that JCE 2.2.4 adds to the folder when it is updated. On one site it did not remove anything and on another it removed most of the folder contents but did not remove the folders.

This just started happening and I have not made any server configuration changes. Not sure what is causing this issue?

nicholas
Akeeba Staff
Manager
If you are on a shared host where Apache and FTP users are different and you have Joomla!'s FTP options enabled you end up with JCE's files owned by Apache and Clean temp directory trying to delete files using JFile, therefore as the FTP user. This means that, indeed, it can't remove those files. The real solution (not a mere workaround) to all such related issues is to move to a host which is using suPHP, mod_fpm or mod_itk. These make sure that the user Apache runs under is the same as the FTP (= your hosting account's) user and you don't need to use Joomla!'s FTP options and all the problems cropping up in the process.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

earthrat
That's the thing Nic, this is a dedicated box that I manage, Apache is run under suPHP, and I have never used FTP for Joomla and all was working before. I cannot verify what version it stopped but I am religious about making sure the tmp folder is empty. This just started happening to me.

nicholas
Akeeba Staff
Manager
What is the onwership and permissions of the files which are note being deleted? What is the user Apache is running under when accessing your site?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

earthrat
Folders are 755 and files are 644. Apache is running under cgi-fcgi. I just did this on another site and did several extension updates. When I do this the first thing I always do is run Fix Permissions out of habit. Although I checked prior to running that and the permissions were correct. The tmp folder had all the updates I ran and after running the Clean Directory tool everything was deleted except for two folders that JCE created when updating to 2.2.4. I am sure this is something to do with JCE and if you cannot figure out this problem I will ask there. Don't think I will get anywhere though.

Also if I use FileZilla to delete the content in tmp it lags bad and takes forever. I have to go into cPanel>folder view to get rid of them. If you would like I can find a site that has not been updated yet and give you a super admin and ftp so you can see this for yourself?

nicholas
Akeeba Staff
Manager
Hm, the only reason for something not to be deleted is it being unwritable. I can't replicate it over here (running Apache with a fixed user, the same as my FTP user) so it's not JCE's fault. I do believe it's permissions/ownership issue, especially if the owner of those folders is different to the one under which the site does run.

FWIW, running PHP as a FastCGI module does not guarantee that you'll be running as the same user as FTP. You need to use the FastCGI Process Manager (mod_fpm) to do that. If, however, you're using suPHP then PHP must run as CGI (not FastCGI) and your index.php files must be owned by the FTP user, otherwise you're running as Apache's default (nobody or www-data) user.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

earthrat
Your right and I dont know why Joomla is reporting Apache as running fcgi? Now I know what I am doing today. I will run some reconfiguration tests on this and recompile Apache and see if this bug is internal (which it has to be I know, but I do know Apache is not running as nobody).

What has me perplexed is everything is being removed except the JCE files and folders (pulling my hair out)...

earthrat
I don't suppose it could have anything to do with using invisible files and folders could it? Just checked closer on a site I updated and now everything was deleted except for one file ".project" and one folder ".externalToolBuilders". Does using this convention stop Admin Tools from deleting the files and folders?

nicholas
Akeeba Staff
Manager
Yes, that would of course cause a problem because this feature depends on Joomla!'s JFolder::getFolders and JFolder::getFiles to scan the directories for subdirectories and files. Joomla! will not report hidden directories/files (i.e. anything whose name begins with a dot), making it impossible to delete those. I suspect that's why Joomla! actually leaves them behind after the JCE update is complete.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

earthrat
Thanks Nic, I will get in touch with the JCE team and ask them why?

nicholas
Akeeba Staff
Manager
Yes, please. Maybe Ryan forgot to remove those directories. I don't think they're deliberately put in there.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!