Joomla installation permission errors - joomla

So I have been given the task of upgrading one of our companies' old websites that is based on 1.5 to something newer (because a second site of ours on the same version just got hacked).
I know some php and some other web stuff, but I'd never used Joomla.
I have setup a lamp server on a local VM (ubuntu) for me to test it all out on, then upload the upgraded version as is suggested. My problem now is that I know the permissions are not correct because when I tried installing Akeeba Backup, it kept throwing errors such as "could not copy to /var/www/components and /var/www/administrator etc. I went in and chmod'd those 2 (and then the rest of www because of more errors) to 757 (from 755 for the most part) - which i know at that point might as well be 777. Then when I've tried to use Kickstart to restore from the JPA file I have, it just right away throws an error "could not create j_backup/ folder".
I know this slackening of all permissions on the root folder is wrong, but it was the only way to get it to 'work', which it's not even now, so my question is what did I do wrong in the setup and how do i fix it? I'm not great with Linux, but I'm thinking I have to make PHP owner of www? is that right? or terrible practice?
The other issue I see now is that I just installed the latest php and everything and I see Akeepa says not to use php 5.4... not sure how much of a problem that's going to be....
Some direction would be great because I'm more than a little lost.
Thanks!

This is certainly a headache. Most often, as you stated, the issue is the ownership of the files on your server. Files uploaded via FTP will be owned by your FTP user and may not be editable by the Apache/PHP user. Similarly, files created by installing extensions in Joomla! will be owned by the Apache/PHP user and your FTP user will not be able to modify them. Here is an article discussing the problem with a couple of possible solutions:
http://docs.joomla.org/Why_can%27t_you_install_any_extensions%3F#File_ownership_advice_from_ianmac
In the past, I have used an Apache Module called suPHP (http://www.suphp.org/Home.html) to solve this problem and keep it from reoccurring. suPHP executes PHP scripts with the permissions of their owners.
As for file permissions other than ownership, please refer to the Joomla! documentation for the correct settings: http://docs.joomla.org/Verifying_permissions. One quick way to handle this (if you can install extensions after correcting the ownership issue) is to use the AdminTools extension (http://extensions.joomla.org/extensions/access-a-security/site-security/site-protection/14087). One of its tools ‘fixes’ the file permissions on your server by resetting them to the Joomla! default.
Good luck!

Related

Problems with clearing cache and permissions on cache dir in Symfony2 projects on Windows

I'm using Windows 10 and run various Sf projects on various versions of Symfony from 2.3 to 3.2. I've had these problems in all of them since forever (also on Win 7). In some projects it's permanent, in others incidental - when clearing cache, things go bonkers - sometimes it can't rename a directory, sometimes it can't delete a file, sometimes it can't open one. Examples:
[Symfony\Component\Debug\Exception\ContextErrorException] Warning: file_put_contents(H:\_Moje_dydy\Documents\Projekty\atm\src/var/cache/dev/classes.map): failed to open stream: Permission denied
This one is very common (but only in some projects!):
[Symfony\Component\Filesystem\Exception\IOException] Cannot rename "H:\_Moje_dydy\Documents\Projekty\friendly_score\src_rainfin\app\cache\de_" to "H:\_Moje_dydy\Documents\Projekty\friendly_score\src_rainfin\app\cache\dev".
In some cases, complete wiping of the cache dir with admin rights helps. In some, it doesn't, and in some other cases it's completely impossible (deleting the dir's contents). Many times, when I was unable to delete the directory and looked into NTFS permissions on some folders within the cache directory I saw complete chaos like this:
Note repeated records for same users, multiple "special" rights (they have very weird sets of permissions within them, that often contradict one another).
In some "heavier" cases it not only interfered with the cache:clear command but also broke the application altogether. In most of those cases it needed very deep interventions to enable me to simply delete the cache dir (some subdirectories had so crazy permissions that even as admin user I was unable to delete them and had to mingle with permissions first).
Here's what I'm using right now:
Windows 10 (happened on Windows 7 too);
XAMPP with PHP 7.1 and Apache 2.4 (happened on older versions with PHP 5.6 and 5.4 too);
Netbeans 8.2 as IDE (happened with previous versions too);
cygwin to run CLI commands;
git.
My primary question is: what mingles with those permissions in such a crazy way? Apache+PHP while creating cache on runtime? Netbeans, even though it ignores cache and log dirs (theoretically - I haven't specifically put them to ignore list in NB)? Git, even those these dirs are ignored in each repo (rather improbable)? Me, while running CLI commands via cygwin (also rather improbable)?
I've been battling it for a long time to no avail...
Do you guys have any insights on this? Thanks.
i had similar problems....
Until i switched from xampp to laragon
I know that sounds odd ,but in my case it solved all the problems.
Symfony provides a documentation about these permission problems :
http://symfony.com/doc/current/setup/file_permissions.html
You can do either use umask(002) before you whole application, or set ACL.
ACL and umask both set a default access right for all new files.

Feared: Blank frontPage yet accessible backend in joomla 1.5.22

I am no expert in Joomla... :)
On my local station using XAMMP, my Joomla 1.5.22 site is running fine but when I upload it to our server online, my problem began, when I visit the frontpage it pulled out nothing but I can still access its backend. I tried to search all over the net, I did some suggested fix but still failed :(
Look for error log in the root folder of your Joomla install, that will give you a hint on why this is happenning.
Also, instead of copying the files and database manually use Akeeba Backup extension for backing up complete site (all files and database) in a single archive. Then use Akeeba Kickstart script for restoring. Akeeba Kickstart will automatically change all configurations needed to run your site on the new server. The extension and the script are free and the process is very simple, look for Youtube videos that show the backup / restore process step by step.
Good luck.
I just get my site back, I just learned that a depreciated module caused the problem, because our server has been upgraded, so I just disabled all my modules on site then single by single I enable it again and find the module that caused the problem, which I did, I'm now replacing that depreciated module with new extension so that the site will be working back.
-- Update --
Now my site is back, I just found out that GD library is not installed on PHP, that's why it shows blank page in the first place, PHEW!
thanks

Joomla administrator redirects to public site

I have a Joomla site running on a windows machine. The site was at 1.6 when some update requests came in. I decided to update the site, but the automated process didn't work, so I started FTPing the files up there manually.
I followed the instructions for the manual upgrade at http://docs.joomla.org/Upgrading_1.6.5_to_1.7 once I got the site to 1.6.5, but my problems had already started before that.
Now when I go to mysite.com/administrator most images are not there and when I try to log in I get kicked up to my site root rather than the /administrator folder. I took the opportunity to look at the code and none of the image src attributes or the form action attributes include "/administrator".
Soooo I need a little advice as to why this is happening. I would rather not have to restore from my backup and start over at 1.6. I was kinda hoping for this to be my first Joomla 3 site. Thanks in advance.
You said that you had trouble with updating Joomla via the admin panel, however did you check if the folders were writable? Site -> System Information -> Directory Permissions Always check this page once you have installed Joomla as it is the reason why a lot of people are unable to install updates or normal extensions.
You then mentioned that you had to upload the files manually via the FTP, however this is not requires. All that is required it to upload the update.zip to the foot of your Joomla site and unzip it.
As for a proper answer, May I suggest that you first update to the Latest version of the 1.6 series (1.6.6), then you download a fresh copy of Joomla 1.6.6, unzip the "administrator" folder, zip that folder, upload via the FTP to your Joomla root folder, then extract it. This will override all the default administrator files.
In the end I had this client move their Joomla install off Windows and onto a Linux machine. Things were just getting worse with the install and I threw in the towel. Thanks to Lodder for trying to help.
This can happen if you are using the JSecure plugin. It requires a token in the URL to enter the admin panel, for example:
http://www.yoursite.com/administrator?token
Explanation:
http://forum.joomla.org/viewtopic.php?p=2198164
I was able to fix this by removing the value that I had in the $live_site variable in the configuration.php file. I am also running this on a Windows server.

install joomla on strato.de

I am creating a website based on Joomla! for my german friend who has a hosting in strato.de
I encountered many problems with installing Joomla on this hosting. After uploading Joomla 1.5.23 files on their server and trying to install Joomla, I got anerror:
Warning: file_put_contents(.../configuration.php) [function.file-put-contents]:
failed to open stream:
Permission denied in /.../installation/installer/models/model.php on line 850
After this, I created manually configuration.php and filled it with database data (passwords etc).
Joomla seemed to be installed, but when I tried to install any extension, I can't do it since it shows only errors like:
Cound not create directory
Component install: failed to create directory
Of course I tried to change directory permissions to 777 but it didn't help, always the same problem and no availability to install any component. The php info shows it's a SunOs on the server and i think something is wrong with owner of the files.
I also tried to install Joomla via strato own installator, but it gives the same errors.
I contacted strato de help office, but they answer was "we do not offer any technical / scripting support for either of the 3rd party CMS's".
Could someone help me please with that?
Has anyone succeed with installing Joomla and components on this hosting?
I would appreciate any help.
First, you should never set the permissions to anything to 777, that's a big security risk.
Next, chances are that the server is not configured properly to run Joomla without any problems. Joomla works a lot better when PHP is run in CGI mode rather than when it is run as an Apache module. Most likely the server you are on is running PHP as an Apache module, which causes a lot of issues.
You can get around a lot of the issues by turning on the FTP layer, but there are some things to check first -
Make sure that both the log and tmp directories exist in the root.
Check the directory permissions by logging in to the admin then Help > System Info > Directory Permissions (you should see the tmp and log directories here as well). Files should be 644, directories should be 755.
Turn on the FTP layer by going to Site > Global Configuration > Server > FTP Settings
If it still gives you errors, I would suggest moving to a better hosting company. Rochen Host has a data center in the UK and they handle all of the official Joomla websites. I use them and they are great. Everything works without any issues.

What is the correct way of migrating a Magento installation from WAMP to an online domain?

Say i have a Magento installation which i've configured and developed on a WAMP server (perhaps also adding products, etc.), what is the correct way to migrate this to an online domain.
I had pretty good luck with this approach when I did it. The WAMP install was on my own box so I didn't use SSH on that side.
http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
I did have a couple errors related to the new domain that their help desk were able to resolve by modifying a couple entries in my .htaccess file. But other than that it was pretty seemless.
I've also done a full backup/restore by simply copying the entire contents from one box to the other. Copying up the MySQL DB, and then I reran the install procedure by simply deleting the app/etc/local.xml file (which forces Magento to run re-install scripts).
The script asks you for the location of the DB, passwords, etc... all the data, products, order history etc, survives a reinstall.
Oh, and make sure to clear your cache/cache folders before you move everything. That saves a lot of head-aches later and reduces the size of files you have to copy.

Resources