Support

Admin Tools

#9884 permission and ownership problems

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 Saturday, 04 June 2011 05:58 CDT

user36653
Mandatory information about my setup:

Have I searched the forum before posting? YES
Have I read the Troubleshooting Wizard before posting? Did not find.
Have I read the documentation before posting? YES
Joomla! version: 1.6.1
PHP version: 5.2.17
MySQL version: Client API version 5.0.92
Host: HawkHost
Admin Tools Professional version: 2.0.5


Description of my issue:

When I open Admin Tools I see several errors like:
Warning: file_put_contents(...../public_html/administrator/cache/com_admintools.updates.ini) [function.file-put-contents]: failed to open stream: Permission denied in ...../public_html/libraries/joomla/filesystem/file.php on line 344

In Permissions Configuration several folder have different permission settings compared to what I've set via putty and filezilla.

I've got several ownership and permission problems when I install and configure extensions.

I've clicked the "fix permission" button and tried to change permissions via the interface but it doesn't change anything.


Please supply all of the information requested above about your setup. The more complete this information, the easier it is for us to help you. Then delete the text in this paragraph and provide an accurate description of your issue. If you see error messages on your screen, please copy & paste them here or take and attach a screenshot to your post. Do not forget to post log files when requested to do so.

nicholas
Akeeba Staff
Manager
Your cache directory must bee writ table by the user PHP runs under or you need to have Joomla!'s FTP layer enabled. The former poses a security risk, unless your server is using suPHP or Apache's mod_itk. Since that is not the case, I strongly recommend enabling Joomla!'s FTP layer.

This is fairly easy. Just go to Joomla!'s Global Configuration and set all of the FTP options. We have compiled a step by step guide on how to that. It's towards the bottom of our installation troubleshooting guide. If you do that, not only Admin Tools will work properly, but you will have much less problems with unwritable folders in Joomla! in general.

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!

user36653
I changed to suphp. The cache folder were 777. I then clicked fix permissions and now all Directory Permissions are Unwritable in Joomla sys info! When checking permissions over filezilla several directories and files have 777! While checking permissions in Admin Tools – Permissions Configuration folders all show 755 and files 644..!..

nicholas
Akeeba Staff
Manager
Once you activate suPHP you need to adjust the permissions of all files and directories so that they are owned by your account's user. This requires SSH access. If unsure ask your host about it.

After you do that, use the Fix Permissions feature of Admin Tools.

Do note that Admin Tools DOES NOT show you the cuerrent permissions, it tells you the intended permissions. You have to go to Permisisions Configuration to see the actual permissions of the files.

Also, very important. Permissions all by itself mean nothing at all. It is the combination of ownership and permissions that matters. In your case the permissions may be correct, but the ownership is wrong, that is why you can not write to the files and directories.

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!

user36653
Hawkhost support fixed the ownership and after one click on "fix permissions" it all works smoothly now :-) Thanks!

Seems a bit slower with suPHP though.

nicholas
Akeeba Staff
Manager
Awesome! Yes, suPHP is slightly slower, but the security benefits greatly outweight the overhead. Small tip: enable Joomla!'s cache in Global Configuration and the "System - Cache" plugin. The performance improvement is mind-blowing, but it requires quite a bit disk space to work. It's all about tradeoffs.

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!

user36653
Thanks for the tip! I will try that out once I'm done with some other fixes, as I guess caching technique prevents me from seeing the results of changes instantly.

user36653
I tried to change password for a super admin account via Joomla User Manager: Edit User. I did that with my main administrator account. I though got "403 - An error has occurred. Access Denied".

I then disabled ftp layer, clicked "fix permissions" again and retried to change the password for the super admin account but got the same 403 error again.

All directories are writable in Joomla sys info and all permissions seem fine in Akeeba Permissions Config.

nicholas
Akeeba Staff
Manager
Go to "Configure WAF" and set "Disable editing backend users' settings" to No. Please read the documentation. You really have to in order to understand what Admin Tools can and will do on 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!

user36653
Thanks it worked! Never thought of that... I will read the manual! :-)

nicholas
Akeeba Staff
Manager
You're welcome!

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!

user36653
Hmmm, I still actually have permission problems. When a user clicks to update their location, they get:

You don't have permission to access /modules/mod_geommunity/mod_geommunity.php on this server.

I enabled the FTP layer again but that didn't help.

nicholas
Akeeba Staff
Manager
This is .htaccess Maker rules kicking in. I suggest taking a look to our documentation on determining exceptions. As you can see, all it takes is to add
modules/mod_geommunity/mod_geommunity.php
to the "Allow direct access to these files" list in .htaccess Maker's configuration, then click on "Save and create .htaccess".

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!

user36653
hmm, I did that now but got this instead when I clicked:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

It seems like the htaccess Maker overrides changes I've done manually to the htaccess file, so I replaced it with the old one again.

I'm now trying to add the exception manually in the htaccess file but can't find where in the file. I've searched on the exception urls which were listed in htaccess maker already like fetchscript.php but couldn't find them. How can I add the exceptions manually in the htaccess file I have?

nicholas
Akeeba Staff
Manager
If you are doing manual changes to the file, you should not use the .htaccess Maker (it will override them). So, you'll have to add the exception manually. Unfortunately, I can't help much with that. The exact place you have to add the exception and the exact rule you have to use are dependent on the rest of the .htaccess file's contents. If you start modifying it manually, I can no longer assist you :(

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!

user36653
I entered it here --->


RewriteRule ^administrator\/components\/com_admintools\/restore\.php$ - [L]
RewriteRule ^modules\/mod_geommunity\/mod_geommunity\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !(\.php)$

Seems to work :-)

nicholas
Akeeba Staff
Manager
Yes, that seems to be the correct place. It is the correct place for .htaccess Maker-based .htaccess files at least :)

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!