Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: regga_dk on June 04, 2012, 09:54:57 AM
-
First off -don't kill me, I'm a novice :-)
After upgrading to SME8 my Ibay tempfolders are unwritable. I'm running Wordpress in a lot of Ibays and normally could upload through the built in uploaders, but no longer. I have the same problem with PHPList.
I'm working from the outside.
Is there som new security feature that I need to close?
regards
Erik
-
Okay, I found out it is an open_basedir restriction in effect.
Now what? I can open /tpm per Ibay as mentioned here http://wiki.contribs.org/PHP (http://wiki.contribs.org/PHP) but can I open for all my Ibays at once?
-
You could use a script something like this, but if you only have 10-15 ibays it might take less time to do it manually than to debug this (possibly incorrect) script:
Script to set PHPBaseDir for all folder names in /home/e-smith/files/ibays:
cd /home/e-smith/files/ibays
for i in `find -maxdepth 1 -type d -exec basename "{}" \;` ;\
do db accounts setprop $i PHPBaseDir "/home/e-smith/files/ibays/$i/:/tmp/" ;\
done
signal-event remoteaccess-update
Alternative script where you enter the ibay names to update (replace "ibay1 ibay2 ibay3 ibay4" in the example with your ibay names):for i in ibay1 ibay2 ibay3 ibay4; \
do db accounts setprop $i PHPBaseDir "/home/e-smith/files/ibays/$i/:/tmp/" ;\
done
signal-event remoteaccess-update
You could also create a list of your ibays in Excel (in column A), then put this formula in b1 and copy it down your list of ibays:
="db accounts setprop "&A1&" PHPBaseDir ""/home/e-smith/files/ibays/"&A1&"/:/tmp/"""
when done, copy the entries in column b and paste them into a terminal window on your SME server, then "signal-event remoteaccess-update"
I don't know if using a custom template fragment to set "open_basedir" in /etc/php.ini would help, since I don't know if the per-ibay directives would override the setting in php.ini.
-
I don't know if using a custom template fragment to set "open_basedir" in /etc/php.ini would help, since I don't know if the per-ibay directives would override the setting in php.ini.
The PHP documentation at php.net should clarify that point.
What OP wants could be done via a custom template fragment for httpd.conf.
-
cd /home/e-smith/files/ibays
for i in `find -maxdepth 1 -type d -exec basename "{}" \;` ;\
do db accounts setprop $i PHPBaseDir "/home/e-smith/files/ibays/$i/:/tmp/" ;\
done
signal-event remoteaccess-update
It worked like a charm - thanks
regards
Erik