Support

Admin Tools

#10018 Error Messages on Admin Tools Page

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, 08 September 2011 17:00 CDT

Baldur2630
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the forum before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.23
PHP version: (5.2.17)
MySQL version: (5.0.92)
Host: (Dayanahosting, but it helps us help you)
Admin Tools version: (unknown)


Description of my issue:
Suddenly started to gets lots of the same error message on the Admin Tools Page

Warning: file_put_contents(/home/xxxxxxxx/public_html/administrator/cache/com_admintools.updates.ini) [function.file-put-contents]: failed to open stream: Permission denied in /home/xxxxxxxx/public_html/libraries/joomla/filesystem/file.php on line 304

Checked all the file permissions and Directories with Admin tools. I don't see any problems. Unable to update automatically or manually

nicholas
Akeeba Staff
Manager
Your cache directory permissions are wrong and do not allow PHP to write to it. Please note that permissions all by themselves mean absolutely nothing. It is the combination of permissions and ownership which defines if a directory is writable or not.

I suggest giving the cache and administrator/cache directories 0777 permissions. Even though they sound crazy (and are, in fact, very permissive!), having a .htaccess file generated by Admin Tools ProFessional means that they can not be used to launch an attack on your site. Even if an attacker manages to write an executable file in either of those directories, he will be unable to execute it over the web, so he got nowhere (the attack was mitigated).

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!

Baldur2630
Nope! Did that and also set /tmp to 777 to check.

Now if I try to update Admin Tools I get

It was not possible to copy the selected file.

JInstaller::install: Failed to copy file: /home/xxxxxxxx/public_html/tmp/install_4e690ad7b206a/frontend/admintools.php to /home/xxxxxxxx/public_html/components/com_admintools/admintools.php


Ir WAS working OK and I haven't made any chnages to the site recently other than chnaging permissions to what you suggested a few minutes ago.

nicholas
Akeeba Staff
Manager
Um, the change which I told you to make is irrelevant to this problem. This is the classic case where you need to enable Joomla!'s FTP layer. Why? Because when you fix the permissions using Admin Tools on a shared server, your directories and files are not writable any more. Bear with me for a minute. Let me give you the solution first and then tell you why this happened.

On most shared hosts which do not run suPHP you have to enable Joomla!'s FTP layer. Otherwise Joomla! won't be able to write the files to its directories and installation will fail.
  • Go to Site, Global Configuration menu item from the top menu.
  • Click on the Server tab
  • Set Enable FTP to Yes
  • Set Enable FTP to Yes
  • In the FTP Host try using 127.0.0.1 or localhost or the FTP hostname assigned by your host
  • In the FTP Root you have to type in the FTP path to your site's root. Here is the easy way to find it using FileZilla: Connect to your site using FileZilla. Navigate inside the folder Joomla! is installed in. Usually it's a directory named public_html, htdocs, www or something similar. If unsure don't ask us, ask your host. Now, on the right-hand pane you will find the FTP path. Most likely it will look something like /public_html. Copy this and paste it into the FTP Root text box in your Joomla!'s Global Configuration page.
  • Save your Global Configuration. If you got everything correctly, you should see a message that your configuration was saved.

Now you can proceed with the installation.

And let's get back to your frustration. Why was it working before and now it's not? It's all about ownership and permissions. For a very detailed explanation please read the Security Information chapter of Akeeba Backup's documentation (make sure you click the "Next" links). It's a long read, but if you don't know everything mentioned in there you can never, ever administer a website properly, let alone secure it. Take your time and do read it, please.

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!

Baldur2630
Nope, not frustrated, been working around computers for too long! Just a bit surprised that Admin Tools has a module to fix permissions that doesn't seem to work on all sites. We have 8 sites and this is the only one I've had this problem on.

I setup the FTP on the site and tried a manual install and got this message :

JFTP::store: Bad response

Warning! Failed to move file.


However, when it went back to the Admin Tools page, it seems to have updated it, because it now says that I have the latest version.

nicholas
Akeeba Staff
Manager
Again, permissions mean absolutely nothing all by themselves. Nada. Zilch. You need to think about the ownership of the file, its permissions, the ownership and permissions of its directory and the user and group your web server is running under before you can understand if Admin Tools should be able to touch your permissions and what your current and your desired permissions mean.

As I said in my previous post, it is imperative that you understand these concepts. Please do take the time to read the documentation I linked you to. Also read the documentation of the Fix Permissions and Permissions Setup pages of Admin Tools.

The only problem you did have on that site is that the permissions did not do what you thought they would because you didn't understand the link between ownership and permissions. And, yes, that also extends to the FTP layer. Just trust me and read the Security Information documentation. After you do, you'll understand what I'm talking about :)

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!