Hi,
I recently moved a web virtual host between two of my Virtualmin VPS machines. This isn't the first time I use this awesome feature, but this time the move did not go very well and I had to change various ownership, permissions, SUexec user and group ID settings to make the website load which was the #1 objective.
'Validate virtual servers' now passes without errors but I still can't make the Script Installer to add phpMyAdmin. I get the following error:
Failed to install script : Failed to open /home/bviphoto/etc/php5/php.ini for writing : Permission denied at ../web-lib-funcs.pl line 1397.
Here are the permissions of etc/php5/php.ini:
-rwxr-xr-x 1 bviphoto bviphoto 69987 Oct 10 18:02 php.ini*
I double-checked, these are identical to the permissions in other virtual host folders where all works. Just to be certain, I restarted the webmin service and tried again - no luck.
I am running Ubuntu 14.04 LTS, Webmin version 1.770 with Authentic skin, Apache 2.4.7 and PHP 5.5.9
What am I missing here?
I will be thankful for any help.
Ivan Arnaudov
P.S. Yes, I can install pma by hand. But I am concerned that this permissions issue may cause other problems down the line and want to find the reason for the error.
The etc/php5/ folder was OK but I also had to do a
chmod +x etc/
and that fixed it.Since this is my first post here, I am unsure if posting a reply is better than editing the first post. Sorry if I got it wrong.
Ivan Arnaudov
It's okay, we don't have strict rules about post formatting :-)
However, you shouldn't normally need to run a chmod on your etc directory... though it's possible things got out of sorts somewhere along the line.
You could also go into Limits and Validation -> Validate Virtual Servers, and the third tab over is "Fix Permissions".
I believe that would also fix permissions of things like the 'etc' directory, in case you have problems in the future.
-Eric
Hi Eric,
Thank you for your input on this. I know about 'Fix Permissions' and tried it first but without success.
It was indeed a strange situation and I am still having issues with phpMyAdmin that prevent me from using it.
When I load the phpMyAdmin URL, first I get an error message over red background on an empty screen that says 'phpMyAdmin - Error. Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.' It sometimes goes away after a page reload.
The second one is a series of warnings in a pink box below the login area:
I will keep digging tomorrow morning and will write again.
-Ivan
Howdy,
Hmm, how did you go about installing phpMyAdmin -- was that done using the built-in Virtualmin Install Script?
-Eric
I used the Virtualmin Script Installer, yes – this is how I noticed the problem in the first place.
I managed to fix the remaining problem by changing permissions on /var/lib/php5:
I found the above solution in this thread on GitHub.
Why the permissions were wrong before and how other vhosts with PHP have worked in the past on the target machine is beyond me.
-Ivan
Howdy,
Yeah you seem to be seeing some really unusual issues there. I'm glad to hear you got it working now though, I wasn't quite sure what was causing that last issue you were seeing.
-Eric