[PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- [PAYH] Safe Mode ON and OFF, www-data, Joomla rest...
[PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-11-2008 2:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
1. It seems PHP safe mode is ON on plesk-host02 but OFF on plesk-host03. As such, the Joomla auto application install in Plesk fails on host02. Why the discrepancy? Can it be turned on/off at a user level as suggested in the permissions section of the Plesk control panel?
2. Running scripts from a browser (like most CMS sites do during initial setup) configures folders and files with the user 'www-data' and rwx r-x r-x permissions. Trying to amend these using an FTP client or through Plesk isn't possible since you're logged in with a different account. These permissions appear too restrictive to complete tasks. In my case I'm trying to restore a Joomla site using JoomlaPack/Kickstart and it's bombing out with "Could not open installation/gpl.html for writing", presumably because the directories the kickstart.php script creates with the www-data user don't have the write permissions for group/others? I realise this has been covered in some other threads but only briefly and without a solid conclusion.
3. Isn't it time for a dedicated forum?

I'm sure this will raise more questions, I'll fill in the blanks as they come up!
Mark.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
12-11-2008 11:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You should be able to duplicate files with user www-data and then set the permissions on the copy.
Gabe
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
12-11-2008 9:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Joomla is pretty much the only reason I'm testing the new setup so I'm stalled for now.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
13-11-2008 8:50 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
This has now been enabled, so you can choose to have this switched on or off, to do this, log in to your plesk control panel, click home, click on to the domain, click setup and move down to the page to php safe mode.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
13-11-2008 8:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Kev Hi
This has now been enabled, so you can choose to have this switched on or off, to do this, log in to your plesk control panel, click home, click on to the domain, click setup and move down to the page to php safe mode.
Thanks Kev, restore of the Joomla site from a different host worked well. Just gotta understand the permissions/www-data thing a bit better and I'm there!
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
13-11-2008 10:35 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
14-11-2008 10:07 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: MarkA Just gotta understand the permissions/www-data thing a bit better and I'm there!
I'm not a Joomla user, but if group and owner are www-data and only scripts need write permission, 755 should be fine. If others need write permission, you could use a php script such as:
<?php
chmod("/pathto/yourfile", 0777);
echo "Done";
?>
Gabe
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
18-11-2008 10:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The only workaround I can find is to go into Plesk filemanager, rename each folder beneath httpdocs, then copy it to the same location with the original name. This has same permissions but different owner, then the various Joomla plugins work again. I'm left with lots of old folders that can't be removed, even via Plesk as they come back with Permission Denied errors.
I can't help feeling I'm missing a simple solution. Have tried chown via PHP script, but since that runs under the www-data user (I think!) it doesn't have sufficient permission to do anything. Shell access would help


Does this all stem from restoring the site from another host or is it the same if doing a fresh install? I tend to think it would be the same?
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
19-11-2008 9:10 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
www-data is the web server, so, from the point of view of a file or folder not in its group, it needs 'other' permissions.
If you want to remove a file created by www-data, you will first need to chmod it 0777 using PHP, which runs as www-data in this setup. Then you can delete it by FTP. If you want to gain control of a file owned by www-data, first chmod it 0777, then duplicate it by FTP, then delete the original. If www-data still needs access, you will need to leave 'other' permissions set.
You can't use chown, because you're not root, but you can use chmod. (It might be possible for admin to give us limited chown under sudo.)
In the thread on using CRON to unpack a tar.gz, I give another method of running shell scripts via Perl. The key line is the qx(shell script) line. You'll notice that Perl variables are interpolated in this example, but if you want to protect shell variables from interpolation, you can substitute single quotes for the brackets.
There are ways of making php run as user (suexec, suphp, mpm-peruser...), but I don't know which, if any, play nicely with plesk. At the moment, (I think) we can't get Perl to talk to PHP properly because of the permissions issue. Running php as user would also be more secure: we have open_basedir protection, but there are ways...
Gabe
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-12-2008 2:21 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am also trying to set up multiple Joomla instances but on plesk-host04 this time. When I go to set up on my domain I seem to only get the option to switch PHP support on or off and management of the option is switched off in permissions

Thanks, Jon

Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-12-2008 9:19 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've managed to restore my Joomla site to a new domain from scratch with Safe Mode on quite happily so it is possible, just not as easy as installing the Application in one step from Plesk.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-12-2008 11:44 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I read an earlier posting and tried to turn safe mode off but this turns off PHP.
My Joomla (on several accounts I have on PAYH) were working beautifully even though I had to fiddle with chmod from time to time. Now with PHP safe mode seemed to have recently been forced to ON, I am completely snookered.
When trying to install a module via Joomla admin it cannot read/write the uploaded files as they belong to www-data.
I am desparate if I cannot fix this I have three PAYH accounts I will have to move elsewhere immediately.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-12-2008 12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Have you tried using the FTP mode of Joomla? I was never able to get this working uder the old CCGI platform but it works very well on PAYH and seems to overcome the Safe Mode issue. I uploaded several new components and modules to my site last night this way and it all worked perfectly.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-12-2008 1:35 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I can't even update the Global Configuration to enable the FTP. Same problem. configuration.php belongs to the account and the php script won't write to it. I suppose I could download the file and manually edit it but that's not really a long term solution for the other administrators.
Despite my delight with PlusNet and PAYH in the past I am really close to dumping it.
Re: [PAYH] Safe Mode ON and OFF, www-data, Joomla restore and so on...
11-12-2008 1:48 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The (template) install seemed to process and then failed with unable to write file. Obviously it can't copy the files to the /templates/ directory.
Can someone please advise, I am completely stuffed.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- [PAYH] Safe Mode ON and OFF, www-data, Joomla rest...