serverguy
Sep 19 2002, 10:49 AM
Can some one tell me on how to turn off safe mode per client?
This on a Plesk...
SERVER GUY :confused:
greyboy
Sep 19 2002, 11:53 AM
Whatever you do, don't bother searching the forums!
-N
greyboy
Sep 19 2002, 12:36 PM
In other words, make an effort to look for an answer before asking how to do things. This is a very common question.
Also, go to
http://forum.plesk.com/ for more Plesk help.
-N
serverguy
Sep 19 2002, 01:03 PM
greyboy
Understand I have been around, I already looked for a post on this subject. Yes I looked on the Plesk site as well. I am looking for the fix on a Plesk and not on a Ensim where there are many.
So any help out there on this subject?
NightHawk
Sep 19 2002, 02:19 PM
that answer is in the faq's at plesk.com or this thread at the plesk forum (or any of many many others)
http://forum.plesk.com/showthread.php?s=&t...hlight=safemode
serverguy
Sep 19 2002, 02:23 PM
Thank you sir I found one simular to that and tried it and it didn't work.
Thanks again
greyboy
Sep 19 2002, 02:50 PM
Please post what you have done, so far, and the results you have received.
-N
serverguy
Sep 19 2002, 02:56 PM
I did the vhost in the conf directory, and of course I changed the domain to ours.
Restarted apache, and ran the test again and still there
php_admin_value safe_mode 0
php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpsdocs:/tmp"
=============================================
Fatal error: Dynamically loaded extensions aren't allowed when running in SAFE MODE. in /usr/local/psa/home/vhosts/domain.net/httpdocs/domain/configurator.php on line 1
Ales
Sep 19 2002, 03:26 PM
Did you restart Apache with the my_apci_rst utility? A simple '.../rc.d/httpd restart' won't do it.
Sorry if I'm stating the obvious, but you never know
NightHawk
Sep 19 2002, 03:36 PM
ok...if you do this..it will work..unless you have something out of the ordinary on your server. or your server's setup....
cd /usr/local/psa/home/vhosts/domain.com/conf/
pico -w vhost.conf
php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
php_admin_value safe_mode 0
#after adding the above to the site....run this:
/usr/local/psa/admin/sbin/my_apci_rst
then it should work
and of course, that only works for http, you need to do a seperate conf file for https.
Hope that helps
serverguy
Sep 19 2002, 03:42 PM
Well guess what the server will not restart the httpd is down I have tried just about everything to bring it back up but will not restart.
I removed that file vhost.
Some one have any ideas on how to get this restarted again before I ghave to call Plesk and pay for it.
RJ
NightHawk
Sep 19 2002, 03:50 PM
what error messages do you get when you try to start apache with apachectl???
(/usr/local/psa/apache/bin/apachectl stop )
(/usr/local/psa/apache/bin/apachectl start )
Btw, you can always do a configtest
(/usr/local/psa/apache/bin/apachectl configtest)
serverguy
Sep 19 2002, 03:57 PM
NightHawk
Well it is back up and runniing again, that info you show in the past few posts have you tried it on a Plesk and if so any problems. Like I said I removed the file already trying to get the server up.
I think the restart command that was listed I didn't understand on how to use it.
Let me no please what you have............
RJ
NightHawk
Sep 19 2002, 04:01 PM
QUOTE
Originally posted by serverguy
NightHawk
Well it is back up and runniing again, that info you show in the past few posts have you tried it on a Plesk and if so any problems. Like I said I removed the file already trying to get the server up.
I think the restart command that was listed I didn't understand on how to use it.
Let me no please what you have............
RJ
LOL, have I tried it on any plesks...LMAO
I run a "few" plesks here at RS.....and that information came from my closely guarded notepad with all my plesk secrets. Everything in that notepad works and is working on a few servers at this very moment....
but, anyway....
(Disclaimer) I am not a RackShack/EV1 Technical Support person and although I will try to assist you in the best manner that I can, I cannot guarantee success. Furthermore, I am not responsible for any downtime/server outages that you may experience as a result of my help.
Ales
Sep 19 2002, 04:03 PM
The instructions NightHawk wrote should do it... Just remember to use my_apci_rst after fiddling with vhost.conf files or you can end up with your httpd down again
Ales
serverguy
Sep 19 2002, 04:11 PM
Ales
What is the command to run that start up what do need to type in I think that was the problem didn't understand it , sorry...
I called Plesk but I had it restarted already there was another problem today with the Qmail Stopping and had to restart it about every few hours. They sent me a file to prevent Qmail crashes as they call it. So it must have a problem too.
I will try that safe mode a about an hour or so.
I will let you no what happens.
RJ
NightHawk
Sep 19 2002, 04:14 PM
QUOTE
Originally posted by NightHawk
#after adding the above to the site....run this:
/usr/local/psa/admin/sbin/my_apci_rst
then it should work
ok, I think you are talking about that line ^^^^^
btw, I don't get it...you are willing to call plesk support everytime you have a small problem..why don't you hire a competent admin with plesk experience from these forums...I bet you can hire one for much much less then what plesk charges...
serverguy
Sep 19 2002, 04:37 PM
It didn't cost nothing it was free.
I don't call them every time, just when a server is down and we can't fix it, these are live servers.
The plesk is 2 days old we have 3 we changed out the old Ensim to the Plesk.
Like alot so far, except for a few problems.
Back to the problem at hand, I found where I was going wrong I was entering our website domain and not the reseller domain in the command linw, dadada.
How do I handle if I have more then one domain that I would like to put on safe mode off.
Do I add it to the same vhost.conf file ???
Oh yes all you guys thanks for the great help....
RJ
NightHawk
Sep 19 2002, 04:39 PM
each time you do it...follow this step first
cd /usr/local/psa/home/vhosts/domain.com/conf/
(of course replace domain.com with the domain.com that your wanting to disable it for)
btw, glad you got it working....I knew it would work.. (and if you had looked you would have seen that I have many posts in here on plesk...actually I have the first plesk that RS ever put on the self, all I am saying...is that if you ask for help...it is not wise to berate the people giving you that free help. )
serverguy
Sep 19 2002, 05:07 PM
So what you are saying is that make a new vhost.conf for each domain or are they added ti the already there, I no it stupid question I needed ask so I no what being done.
I no it looks like I am new guy since I only have a few posts trust me I have beed around before RS was here.
I also do have a programmer on a call bases which I no for about 20 years, and also works cheap. The only thing he is on vacation so I can't can't him.
Time to run my psa qmail crash script
RJ
Thanks all for your great help....
ragnar
Nov 7 2002, 11:02 PM
Thanks for the thread guys. I have followed these instructions to the letter and feel like I am very close to getting this set-up. If someone could respond with any ideas on the following error it would be greatly appreciated.
I set up the vhost.conf file. WHen I ran the apachectl start command I got the following...
Syntax error on line 2 of /usr/local/psa/home/vhosts/domain.com/conf/vhost.
conf:
php_admin_value takes two arguments, PHP Value Modifier (Admin)
Here is what the vhost.conf file looks like:
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
php_admin_value safe_mode 0
Then I tried this:
php_admin_value safe_mode O
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
And got the following error:
[usr/local/psa/admi/usr/local/psa/apache/bin/apachectl configtest
[Thu Nov 7 20:11:59 2002] [warn] NameVirtualHost xxx.xx.xxx.xxx:443 has no Virt
ualHosts
Syntax OK
Can anyone see what could be wrong here?
Thanks,
Ragnar
NightHawk
Nov 7 2002, 11:17 PM
QUOTE
Originally posted by ragnar
Thanks for the thread guys. I have followed these instructions to the letter and feel like I am very close to getting this set-up. If someone could respond with any ideas on the following error it would be greatly appreciated.
I set up the vhost.conf file. WHen I ran the apachectl start command I got the following...
Syntax error on line 2 of /usr/local/psa/home/vhosts/domain.com/conf/vhost.
conf:
php_admin_value takes two arguments, PHP Value Modifier (Admin)
Here is what the vhost.conf file looks like:
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
php_admin_value safe_mode 0
Then I tried this:
php_admin_value safe_mode O
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
And got the following error:
[usr/local/psa/admi/usr/local/psa/apache/bin/apachectl configtest
[Thu Nov 7 20:11:59 2002] [warn] NameVirtualHost xxx.xx.xxx.xxx:443 has no Virt
ualHosts
Syntax OK
Can anyone see what could be wrong here?
Thanks,
Ragnar
yep..simple error:
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
php_admin_value safe_mode 0
should be :
php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:"
php_admin_value safe_mode 0
not sure if this forum will let that work out our not...but these 2 lines:
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
should be one line.
and this error:
[usr/local/psa/admi/usr/local/psa/apache/bin/apachectl configtest
[Thu Nov 7 20:11:59 2002] [warn] NameVirtualHost xxx.xx.xxx.xxx:443 has no Virt
don't worry about it...it is nothing....lol
hope that helps:cool:
ragnar
Nov 7 2002, 11:36 PM
That did it!
Thanks a million!
NightHawk
Nov 7 2002, 11:53 PM
QUOTE
Originally posted by ragnar
That did it!
Thanks a million!
np..anytime
Rich2k
Nov 8 2002, 09:05 AM
That problem is quite common if you don't use pico -w vhost.conf
-w stops line wrapping.
I don't want to store up a hornet's nest but why should you need safe mode disabled? There are a couple of instances I can think of but most sites should run happily with it on.
ragnar
Nov 11 2002, 01:13 PM
No offense taken. I have quite a few sites where clients need to have an ftp upload routine that pulls files from their local machine and places them on the server.
With safe_mode enabled, that was not possible. This was the only way I could see of allowing that.
Incidentally, I also ended up having to raise the php.ini limits for file transfer size and duration to allow uploading of files larger than the 2Mb default.
All is working well now.
Ragnar
Rich2k
Nov 12 2002, 11:09 AM
Do you mean with PHP FTP commands? FTP commands work with safe mode enabled. (unless of course you are using shellexec to cause a command line FTP transfer).
ragnar
Nov 12 2002, 11:51 AM
Yes, my upload routine is written with php for use by the client from the site.
Helter
Dec 6 2002, 10:51 AM
QUOTE
Originally posted by ragnar
Yes, my upload routine is written with php for use by the client from the site.
I believe that this happens because php is by default configured to place temporary upload files in the /tmp directory, which is off limits per the open_basedir restriction.
You shouldn't have to turn safe mode off, only extend the clients access to the /tmp directory, OR reconfigure php to use a directory within the clients folder ( can you set the value to ~/tmp ? would that work?)
Ales
Dec 8 2002, 05:03 AM
I don't know about ~/tmp... how about ./tmp? I haven't tried it yet. We usually just use open_basedir directive to include /tmp.
It might be a security issue though, if you have socket files in there or other sensitive session data... Or somebody could try to fill up the partition your /tmp is on... Yea, I know... that's a bit too paranoid
NightHawk
Dec 8 2002, 11:32 AM
QUOTE
Originally posted by Ales
I don't know about ~/tmp... how about ./tmp? I haven't tried it yet. We usually just use open_basedir directive to include /tmp.
It might be a security issue though, if you have socket files in there or other sensitive session data... Or somebody could try to fill up the partition your /tmp is on... Yea, I know... that's a bit too paranoid
no..there is no such thing as a bit too paraniod... paraniod is good....
tornado
Feb 22 2003, 12:25 PM
Hi,
i see people posting about wanting to upload a file and getting the 'open_basedir error.
People the reply saying turn off safe mode.
My knowledge is that if you turn off safe mode that people who have access to your server (vhost people) could access files outside the vhosts paths.
My question is, what does open_basedir do or what was it restricting me from doing? (all i know is that it fixed my problem)
I had a php upload script and used the following on one vhost to avoid the open_basedir error thing.
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
My php upload script then worked without having the safe mode option off.
What security issues could i be running into here with the open_basedir set for this 1 vhosts??
Helter
Feb 22 2003, 12:36 PM
QUOTE
Originally posted by tornado
Hi,
i see people posting about wanting to upload a file and getting the 'open_basedir error.
People the reply saying turn off safe mode.
My knowledge is that if you turn off safe mode that people who have access to your server (vhost people) could access files outside the vhosts paths.
My question is, what does open_basedir do or what was it restricting me from doing? (all i know is that it fixed my problem)
I had a php upload script and used the following on one vhost to avoid the open_basedir error thing.
php_admin_value open_basedir
"/usr/local/psa/home/vhosts/domain.com/httpdocs:/"
My php upload script then worked without having the safe mode option off.
What security issues could i be running into here with the open_basedir set for this 1 vhosts??
You've given that vhosting account access to your entire drive. Their scripts can now access any file on your drive.
Open_basedir restricts what files can be accessed by php scripts. The reason you couldn't use php uploads before was that php stores it's upload files in the /tmp directory during the upload. Because your open_basedir restricion was set to their httpdocs directory, the script could not access the /tmp directory to get the uploaded image.
Instead of :/" use, :/tmp" That way you'll only be giving the hosting account access to the tmp directory (which is what is needed for file uploads to work) instead of the entire server.
Rich2k
Feb 22 2003, 02:36 PM
Actually under php 4.3.0 + you can't use this value
php_admin_value open_basedir "/"
It will give you this error
Warning: Unknown(): open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/domain/httpdocs/index.php) is not within the allowed path(s): (/) in Unknown on line 0
drumsy
May 5 2003, 05:52 PM
Do I need to turn MySQL off before running the reboot command mentioned here?
QUOTE
/usr/local/psa/admin/sbin/my_apci_rst
NightHawk
May 5 2003, 06:31 PM
QUOTE
Originally posted by drumsy
Do I need to turn MySQL off before running the reboot command mentioned here?
that's not a reboot command...but it will restart apache...so no..no need to touch mysql
drumsy
May 5 2003, 07:03 PM
QUOTE
Originally posted by NightHawk
that's not a reboot command...but it will restart apache...so no..no need to touch mysql
Thank you times infinity for your exact directions in getting this setup!

I and my members appreciate it very much!
www.honda-acura.net
NightHawk
May 5 2003, 07:10 PM
QUOTE
Originally posted by drumsy
Thank you times infinity for your exact directions in getting this setup!
I and my members appreciate it very much!
www.honda-acura.net
NP
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.