Koozali.org: home of the SME Server

Mambo /tmp unwriteable

joep

Mambo /tmp unwriteable
« on: March 31, 2005, 01:03:20 AM »
Hi All,

I'm running 6.01 and I've installed Mambo 4.5. During the install, I receive a flagged message that /tmp is unwriteable. I've tried everything I know:

chmod 777 the /tmp
chown to match the rest of Mambo (admin:shared)
edit the php.ini file to look at another /tmp directory..

I think the redirect may possibly work if I can figure out where to put the tmp directory so that all Virtual Sites can still use it...

Does anyone have experience with this install? I'm also having difficulty with some of the Mambo modules, but this may be due to the unwriteable /tmp directory.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Mambo /tmp unwriteable
« Reply #1 on: March 31, 2005, 04:58:05 AM »
Quote from: "joep"
I've tried everything I know:

chmod 777 the /tmp


Never, ever do that. 777 is *never* a correct permission for a directory.

What are the actual permissions of /tmp? If they're wrong, you can correct them using:

rpm --setugids filesystem

Quote

Does anyone have experience with this install? I'm also having difficulty with some of the Mambo modules, but this may be due to the unwriteable /tmp directory.


If the permissions of /tmp are actually correct, it's possible (probable?) that you are having a problem due to PHP "sandboxing". Undo all the changes you have done, then find a howto by someone who has Mamba working on SME, and follow it to the letter.

joep

rpm --setugids filesystem
« Reply #2 on: March 31, 2005, 05:43:05 AM »
Thanks for the tip to reset all permissions. I did this. I will naturally check the Mambo site for help as well.

The 777 permissions while not "correct" though, would certainly eliminate any permissions issues for troubleshooting wouldn't it? Is there ever a case where a 777 chmod would actually break something (besides the security issue)?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: rpm --setugids filesystem
« Reply #3 on: March 31, 2005, 06:24:35 AM »
Quote from: "joep"

The 777 permissions while not "correct" though, would certainly eliminate any permissions issues for troubleshooting wouldn't it? Is there ever a case where a 777 chmod would actually break something (besides the security issue)?


You're correct on both counts. The security issue though is enough to say you should never set (and leave) permissions to 777.

Skydiver

/tmp
« Reply #4 on: March 31, 2005, 07:15:42 AM »
for this to work you need to allow access from the ibay for the /tmp foulder.

To allow access to the /tmp folder you will have to disable the open_basedir restriction.

note this thread

http://forums.contribs.org/index.php?topic=26648.0


When you work it out please explain it to me. I am trying to get the same thing on the /tmp foulder and also zoneinfo foulder

Cheers

mbachmann

Mambo /tmp unwriteable
« Reply #5 on: March 31, 2005, 10:08:19 AM »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: /tmp
« Reply #6 on: March 31, 2005, 05:52:51 PM »
Quote from: "Skydiver"
for this to work you need to allow access from the ibay for the /tmp foulder.

To allow access to the /tmp folder you will have to disable the open_basedir restriction.


Don't disable: change it to include /tmp. See the Troubleshooting FAQ (But beware, the advice given there has an extra line break which will prevent the commands from working if typed as shown).

Skydiver

command
« Reply #7 on: March 31, 2005, 09:35:32 PM »
/sbin/e-smith/db accounts setprop <ibayname> PHPBaseDir /home/e-smith/files/ibays/<ibayname>/:/tmp
/sbin/e-smith/signal-event ibay-modify <ibayname>

will this work the same for SME 7.0 alpha 3

mbachmann

Re: /tmp
« Reply #8 on: April 01, 2005, 12:56:03 PM »
Quote from: "CharlieBrady"
See the Troubleshooting FAQ (But beware, the advice given there has an extra line break which will prevent the commands from working if typed as shown).


Corrected, thx Charlie.

joep

Line Break
« Reply #9 on: April 06, 2005, 09:03:52 AM »
Hey Guys,

I tried to follow Sydiver's commands but received an error, maybe I'm misunderstanding the variables. If I want to move the PHP tmp folder to the files older inside the Primary, would I enter:

/sbin/e-smith/db accounts setprop Primary PHPBaseDir/home/e-smith/files/ibays/Primary/files/tmp (no line break)

When I do this, I receive the following message:

/sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...

Am I missing something?

Thanks

JOe

joep

I Love Being An Idiot!
« Reply #10 on: April 06, 2005, 09:09:55 AM »
Please ignore the previous post. I noticed after I posted the message that there was a missing space between PHPBaseDir and /home...

THere was no error this time.

I'm still unclear though I I need to do anything with this direction:

Related to open_basedir setting in php.ini file. SME does not allow PHP in /tmp or /usr/share. This is a security measure. PHP values are set per ibay in the template:

/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays

There you can set the basedir (or the includedir) for all ibays by changing the template.

joep

Totally Hosed!
« Reply #11 on: April 06, 2005, 10:38:00 PM »
It looks like I hosed up my php... Is there a way to reset php to defaults? After running these 2 commands, my Mambo website is totally down!!

/sbin/e-smith/db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/tmp/

/sbin/e-smith/signal-event ibay-modify Primary

Help!!!

Skydiver

Reply Error
« Reply #12 on: April 06, 2005, 10:45:03 PM »
you could try this

/sbin/e-smith/db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/

/sbin/e-smith/signal-event ibay-modify Primary

Just a guess your command made everying for under the tmp foulder. What happens if you move everything into the tmp foulder does it work. if so try the above..

Skydiver

Nothing works
« Reply #13 on: April 06, 2005, 10:49:36 PM »
SME 7.0 aplha 5


The commands dont seem to work

How do i disable the open_basedir restriction.

in the php.ini i dont see a line for open_basedir

Should i add something like :

open_basedir = NULL or None

I would like to just test the application works with no open_basedir restrictions if it does then i will continue to find the correct way to set it.

joep

Re: Reply Error
« Reply #14 on: April 06, 2005, 11:15:17 PM »
Quote from: "Skydiver"
you could try this

/sbin/e-smith/db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/

/sbin/e-smith/signal-event ibay-modify Primary

Just a guess your command made everying for under the tmp foulder. What happens if you move everything into the tmp foulder does it work. if so try the above..


Hey Skydiver, It worked! Thanks! I have to reset some links, but the site is back up...

So, I assume then that these commands re-direct more than just the tmp/directory for php eh?

Thanks Again...