• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

open_basedir issue -- about to throw plesk into the trash and install cpanel

S

sensel

Guest
So,

the base joomla install doesn't work on my plesk server. after spending about 5 hours of my time trying to figure out these retarded open_basedir restrictions.. I've about given up. (I charge 50$/hour, I'm thinking of sending that bill to swsoft)

Apparently, this has been a problem since like plesk version 5. People keep bringing it up, but no one ever resolves it. So I will ask again.

HOW DO YOU DISABLE OPEN_BASEDIR AS A DEFAULT FOR MY httpd.include FILE ON NEW DOMAIN CREATION?

I do not want your lame bullshit vhost.conf answer. I want to know how I can influence the creation of the httpd.include file, including but not limited to htaccess settings and open_basedir settings.

I have about 300 domains to install to this server. And if you expect me to sit there and modify the ****ing configuration file for each one you're off your god damn rocker.

If there isnt a solution for this in 24 hours, I'm going to stop using plesk for myself and all of my clients. This includes some 40+ dedicated servers, my web hosting boxes (8+), and then some.

I was thinking of moving to hsphere... BUT WHY DID SWSOFT HAVE TO BUY IT? YOU GUYS ALWAYS SEEM TO RUIN GOOD THINGS! Next you'll buy cpanel!!! and then I wont have anywhere to hide from this SWSOFT beast who doesnt know how to code or make things easier for users!! OH GOD SAVE ME!!
 
Good point, I guess I should do that. I just felt I should come here and flame publicly a little bit. Every time I try to do anything with plesk it has become an absolute total nightmare.
 
I couldn't agree more.

I've switched to DirectAdmin for all my new boxes. So far it's running on 12 boxes and works great. No bizzaro licensing schemes, unlimited domains (it is MY server after all), and just generally feels more like a FreeBSD server with a non-intrusive GUI frontend -- rather than Plesk which feels like a PLESK server and it hardly matters what operating system sits underneath it.

I feel your frustration. Every time I try to do even the most mundane operation -- I have to first spend an hour or two researching the "Plesk way" of doing it.

One gets the feeling that the Plesk devs think they know better than us standard 'nix admins, so they've "improved" stuff. Except they haven't. Everything is so convoluted, so unintuitive, and so non-standard. In short: A giant pain in the arse.

The GUI is a textbook example of how to make users frustrated and unable to easily find what they're looking for. And the backend scripts and architecture are fragile and bewildering.

Then they add insult to injury by nickel and diming you to death for the privilege of installing open source software packages or alternate languages.

I've rarely felt so much venom for a software company. Only 2 of my boxes are Plesk -- but I've probably spent more time pulling my hair out over these than all my other servers combined (all cpanel and directadmin). I'll never spend another dollar on anything from SWSoft and eagerly await the day I can phase these last 2 out.

Good riddance.

PS: Yes, I have a low post count. No I'm not a troll. I'm usually here looking for answers to retarded Plesk issues (for example the one I'm dealing with right now). I saw this post and felt compelled to let off a little steam.
 
Some how I don't have any openbase_dir issues anymore since I solved the selinux problems.

Solving the selinux problems was relatively easy (it was much harder to find the solution). In our case it was simply disabling selinux, reinstalling the plesk selinux package with rpm and the --force option and re-enabling selinux. Openbase_dir issues we had are gone now, eventhough they're still only allowed to the standard directories.

Perhaps you have a similar issue. No PHP guru, but it appears executing files outside of openbase_dir restrictions goes fine (for example, typo3 can execute /usr/bin/convert without troubles). Would have to look it up, but openbase_dir probably only prevents including/reading files outside the openbase_dir restrictions, not executing them.

Concerning the interface, I find it quite intuitive, it doesn't let me do all I want (like disabling mail on a domain and enabling it on domainaliases, this doesn't appear possible without mailsupport on the primary domain), but plesk isn't targetted for me, it's targetted for our end-users, which know nothing about linux and can quite easily find what they need to do.
 
I actually had very similar issues with open_basedir.

These seemed (I resolved several issues with Plesk but most, if not all, seem to had their origination at selinux being in the way at some point, hence selinux was either blocking stuff that didn't make it work, or selinux prevented the installation not going properly giving issues in the future) to originate from php not being able to read the php.ini file (note phpinfo() reported it DID!! load that config file). The only reason I found out that didn't work was because we had issues with php sending mail out and I thus adjusted php.ini to use qmail-inject instead of sendmail and the phpinfo() didn't reflect these changes.

You just add the path that should already be in openbase_dir again (well sort of you add a subdirectory of the path that should already be in there, with us location is /var/www/vhosts/<domain>/httpdocs, that should include /var/www/vhosts/<domain>/httpdocs/<anysubdirs>), so that issue seems very similar to me (instead of changing/adding paths I used 'none' to solve it, effectively disabling openbase_dir). We had issues with just about every CMS we tried (joomla, typo3 and some others) not being able to include stuff. When reading the logs a file that would be included as "include("file.php")" would read /file.php in the logs (as if it were in the root (/) folder, all includes seemed to be prefixed with /).

Anyways, ever since I fixed selinux these problems are gone, I can even delete my vhost.confs from domains (with an exception on a couple that override memory limits) and it will still work. Perhaps it isn't the only package that had issues because of it, we updated to 8.2 later on so since plesk updated most packages, and it could properly install with the then current selinux settings, it perhaps fixed issues that came forth out not being able to install properly earlier.

I would like to urge you to try reinstalling the selinux package (the plesk one, not the one from suse, the plesk one should contain the proper ACL's (rights) required for plesk) if you use selinux on SuSE (not familiar with it anymore last version I used was 7 or something) and perhaps some other packages too. During the reinstall disable selinux. You can also try just disabling selinux and seeing if your openbase_dir problems disappear, as this will tell you really quick whether selinux is the issue or not. Do restart apache after disabling selinux, so it has a chance to read config files etc. it might not have access to earlier.

Btw, I actually found the vhost.conf stuff in the forums!! (not the knowledgebase) quite easily. But it's unacceptable to have to create one for every domain, because you otherwise know most PHP stuff will screw up.

Searching selinux on the forums you'll find a lot, and I mean a LOT, of frustrated users with selinux. Therefore it's uncomprehensible to me it is not in the knowledgebase (or atleast, not with the search terms I've tried and I used quite a few, did find the reinstalling in the knowledgebase, but not on any issue related to what I was experiencing.).

Btw, my awstats issue, was easily solved by editing /etc/psa/psa.conf (not sure if that's the correct path can't check now) and adjusting the path for awstats. Figured this out myself, couldn't find anything in the knowledgebase.

I'm having a strong feeling they like to sell additional support. As I see many users with similar issues in the forums and I see a ****** knowledgebase. Searching the forums for these issues isn't quite nice either, as most of the results are just frustrated people (which they have every right to), with no solutions. They might be there, but you'll have to wade through a shitload of **** first.
 
Originally posted by df-sean
I've switched to DirectAdmin for all my new boxes. So far it's running on 12 boxes and works great. No bizzaro licensing schemes, unlimited domains (it is MY server after all), and just generally feels more like a FreeBSD server with a non-intrusive GUI frontend -- rather than Plesk which feels like a PLESK server and it hardly matters what operating system sits underneath it.

I feel your frustration. Every time I try to do even the most mundane operation -- I have to first spend an hour or two researching the "Plesk way" of doing it.

I think you might like h-sphere (www.psoft.net) also. I didnt use DirectAdmin but between h-sphere and directadmin, I had to choose h-sphere because of native windows platform support and it was the right choice, also unlimited domains and very cheap licensing.
 
Native Windows platform support is one of the reasons why I passed over hsphere ;-)
 
Originally posted by sensel
So,

the base joomla install doesn't work on my plesk server. after spending about 5 hours of my time trying to figure out these retarded open_basedir restrictions.. I've about given up. (I charge 50$/hour, I'm thinking of sending that bill to swsoft)

Apparently, this has been a problem since like plesk version 5. People keep bringing it up, but no one ever resolves it. So I will ask again.

HOW DO YOU DISABLE OPEN_BASEDIR AS A DEFAULT FOR MY httpd.include FILE ON NEW DOMAIN CREATION?

I do not want your lame bullshit vhost.conf answer. I want to know how I can influence the creation of the httpd.include file, including but not limited to htaccess settings and open_basedir settings.

I have about 300 domains to install to this server. And if you expect me to sit there and modify the ****ing configuration file for each one you're off your god damn rocker.

Hi,

Why don't you simply create a sample vhost.conf with correct directive and copy it to domains' conf directories?
As for newly created domain you can create an event handler that will automatically create vhost.conf, insert needed directives and place it to domain's conf directory. An example creating such event handler is present in this knowledge base article:
http://kb.swsoft.com/en/966

It is really not that hard. And speaking of giving users ability to alter predefined httpd.include file. This file is generated based on what options you select on domain hosting preferences setup page - it is adding appropriate directives to this file. Now imagine someone changes this file, inserts wrong directive or messes directives inserted by Plesk - you will see face lots of problems like "Oh my God I selected php support for Domain but it does not work", "My apache does not start giving some strange configuration errors" and so on ;)
So I guess prohibiting adding changes to httpd.include and allowing adding custom directives to vhost.conf is a good solution.

You mentioned spending 5 hours trying to figure out open_basedir restrictions. These restrictions are not added to cause additional problems to users but to avoid possible security issues. Now imagine yourself spending days to find how your server was hacked and getting it back to work. I guess you should agree that presence of these directives in domain configuration makes sense.

Plesk rocks :) You just have to relax and enjoy it ;)
 
Just transferred all my domains over to GoDaddy VPS running Fedora 7 and Plesk 8.2.1 and it all went smoothly until I hit the open_basedir problem. I JUST WANT TO TURN IT OFF.

I have spent HOURS on this. Putting in my own vhosts file

Code:
<Directory /var/www/vhosts/savemybacon.com/httpdocs>
php_admin_value open_basedir none
</Directory>
in /home/savemybacon.com/conf

doesn't seem to have any effect and my only solution so far has been to manually hack the automatically created httpd file and remember to re-edit it if I have to restart.

Stuck...
 
I have no idea what the location for domains is with you, but with us it's /var/www/vhosts/<domainname>.

Assuming it's /home/<domainname> with you, which I'd find pretty stupid, but ok, and considering the rest of the relative paths are the same for you it would be /home/<domainname>/conf/vhost.conf.

After adding the vhost.conf you need to run (again don't know your paths) /usr/local/psa/admin/sbin/websrvmng -a (this will add an include for the new config file), after that is done you will need to reload the apache config, usually /etc/init.d/httpd reload (or /etc/init.d/apache reload).

Obviously, if your html files are under /home/<domainname>/httpdocs your vhost.conf needs to reflect it (you still have /var/www/vhosts/blabla in there).
 
/home is just a dynamic link I use as shorthand for /var/www/vhosts/

I did all that and still couldn't get it to work, but it was getting late after a long day of cursing, so I will sit down and follow your instructions with a fresh cup of tea.

Thanks for your suggestion.
 
Just to continue on the vhost discussion, you can always put a vhost.conf in the skel directory so it gets copied to all new domains by default, I have done that ona couple of servers.

Also to comment to the thread starter - Im surprised you got any help coming in and swearing up a storm. I would have left you alone, and Im not suprised to see most of the forum regulars not posting in this thread either.
 
on the skel idea, how do you define the domain name to put in the conf file?

in this example, the savemybacon.com bit:

Code:
<Directory /var/www/vhosts/savemybacon.com/httpdocs>
php_admin_value open_basedir none
</Directory>
 
replace your domain name with @domain_name@

unfortunately that is the only variable plesk can parse. I use a script to do it in event manager for most servers so I can set suphp settings and some other settings as well.
 
I use a script similar to this across most servers to set basedir, suphp, etc

Its made very generically, but you can edit it to set real source locations of files, etc so that its not so generic. You would then use this script as an event handler for when the domain was created.

Code:
#!/bin/bash

#Get LoginPW for Plesk DB
admin_pwd=`cat /etc/psa/.psa.shadow`

#the path to psa.conf
PSACONF=/etc/psa/psa.conf

#This is the Installation directory where PSA is installed
PSAInstallDir=`grep -i PRODUCT_ROOT_D $PSACONF| awk '{ print $2 }'`

#New File location of the users vhost.conf file
VHOSTLocation=/var/www/vhosts/$NEW_DOMAIN_NAME/conf/vhost.conf

#Path to a template file, only needed if using section 2 below
PathToFile = /path/to/your/tepmlate.conf

#Get the Domain Name's owner from MySQL based on the odmain name
mysql="mysql -N -B -uadmin -p$admin_pwd psa" 
query="SELECT c.login from clients c, domains d where c.id=d.cl_id AND d.displayName='$NEW_DOMAIN_NAME'"
CLIENT_LOGIN=`echo "$query"|$mysql`


#----------- SECTION 1 - No template file ------------- #
# the domain name will be passed from Plesk via NEW_DOMAIN_NAME
# so write out the conf file
cat  << EOF >> $VHOSTLocation
<Directory /var/www/vhosts/$NEW_DOMAIN_NAME/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/$NEW_DOMAIN_NAME/httpdocs:/tmp:/var/tmp"

    <IfModule sapi_apache2.c>
        <IfModule mod_suphp.c>
            RemoveHandler x-httpd-php
            php_admin_flag engine Off
            suPHP_AddHandler x-httpd-php .php
            suPHP_Engine on
            AddHandler x-httpd-php .php
            suPHP_UserGroup $CLIENT_LOGIN psacln
        </IfModule>
    </IfModule>
	
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
        RewriteRule .* - [F]
    </IfModule>

</Directory>
EOF
#----------- END SECTION 1 ------------- #


#----------- SECTION 2 - Using a template file ------------- #
#if the file exists somewhere as a template then you can comment or remove the first part 
#and uncomment the following couple of lines to do this instead

	#Copy to the users conf directory
	#cp --reply=y $PathToFile $VHOSTLocation
	
	#Now edit the file
	#This will replace @@DOMAIN_NAME@@ text with the domain name of the client
	# perl -pi -e "s/@@DOMAIN_NAME@@/$NEW_DOMAIN_NAME/gi" VHOSTLocation

	This will replace the @@USERNAME@@ text with the domain owners username
	# perl -pi -e "s/@@USERNAME@@/$CLIENT_LOGIN/gi" $VHOSTLocation
#----------- END SECTION 2 ------------- #
	
#Regardless of which version you used, now you have to configure Plesk to use the vhost.conf file
$PSAInstallDir/admin/bin/websrvmng -v --reconfigure-vhost --vhost-name=$NEW_DOMAIN_NAME
 
This works

To summarise advice from above (huge thanks!)

Added conf directory to /var/www/vhosts/.skel/0


create vhost.conf file in it containing

Code:
<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir none
</Directory>

for existing domains went and added this by hand.

then

Code:
/usr/local/psa/admin/sbin/websrvmng -a
/etc/init.d/httpd  reload

My only remaining problem is the above does not work correctly when setting up subdomains as it still puts the domain path in. But much better!
 
open_basedir restrictions + Joomla

So,

the base joomla install doesn't work on my plesk server. after spending about 5 hours of my time trying to figure out these retarded open_basedir restrictions.. I've about given up. (I charge 50$/hour, I'm thinking of sending that bill to swsoft)

I have it working - http://www.donnellyholdingsllc.com

shoot me an email

-64bithost.com
[email protected]
 
Back
Top