Koozali.org: home of the SME Server

How to install Epiware on SME server 7.3

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #15 on: May 15, 2010, 06:20:04 AM »
manegar & Joeg1484

I believe it goes like this.
PHP code in an ibay has restricted access to that ibay only. This is so that errant apps cannot write stuff to elsewhere in your servers file system that you don't want written. This is part of the good default security design/model in SME server.

I think the correct way to do it, is to create a tmp folder within the ibay and then specifiy that location.
If you repeatedly specify /tmp as the PHPBaseDir for different apps in different ibays, then there is the security risk that one app may be able to read another apps files, and again do something that you don't really want done.

ie (using example given)

mkdir -p /home/e-smith/files/ibays/eroom/html/tmp
db accounts setprop eroom PHPBaseDir /home/e-smith/files/ibays/eroom/:/home/e-smith/files/ibays/html/tmp
signal-event ibay-modify eroom

Please also refer to this
http://wiki.contribs.org/DB_Variables_Configuration#Apache_server_ibay_specific_.28httpd-e-smith.29
where it is indicated that the default value for a ibay is
/home/e-smith/files/ibays/ibayname
Note that default values apply where there is no specific db entry, so the absence of a db entry associated with that ibay does not mean there is no PHPBaseDir setting.
« Last Edit: May 15, 2010, 06:25:00 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Joeg1484

  • *
  • 35
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #16 on: May 15, 2010, 06:28:30 AM »
manegar & Joeg1484

I believe it goes like this.
PHP code in an ibay has restricted access to that ibay only. This is so that errant apps cannot write stuff to elsewhere in your servers file system that you don't want written. This is part of the good default security design/model in SME server.

I think the correct way to do it, is to create a tmp folder within the ibay and then specifiy that location.
If you repeatedly specify /tmp as the PHPBaseDir for different apps in different ibays, then there is the security risk that one app may be able to read another apps files, and again do something that you don't really want done.

ie (using example given)

mkdir -p /home/e-smith/files/ibays/eroom/html/tmp
db accounts setprop eroom PHPBaseDir /home/e-smith/files/ibays/eroom/:/home/e-smith/files/ibays/html/tmp
signal-event ibay-modify eroom

Please also refer to this
http://wiki.contribs.org/DB_Variables_Configuration#Apache_server_ibay_specific_.28httpd-e-smith.29
where it is indicated that the default value for a ibay is
/home/e-smith/files/ibays/ibayname
Note that default values apply where there is no specific db entry, so the absence of a db entry associated with that ibay does not mean there is no PHPBaseDir setting.

Thanks for the reply... Would something like this work. I only need it for one application that I am planing on using, however, the knowlege is great incase I get a new client that needs more... So, would this work as well?

Code: [Select]
mkdir -p /home/e-smith/files/ibays/epi/files/storage
db accounts setprop epi PHPBaseDir /home/e-smith/files/ibays/epi/files:/home/e-smith/files/ibays/epi/files/storage:/home/e-smith/files/ibays/html
signal-event ibay-modify eroom

Thanks again for the assistance !!!

Joe

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #17 on: May 15, 2010, 07:04:47 AM »
Joeg1484

Try (read it carefully for slight correction/changes)

mkdir -p /home/e-smith/files/ibays/epi/files/storage
db accounts setprop epi PHPBaseDir /home/e-smith/files/ibays/epi/:/home/e-smith/files/ibays/epi/files/storage/:/home/e-smith/files/ibays/epi/html
signal-event ibay-modify epi

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Joeg1484

  • *
  • 35
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #18 on: May 15, 2010, 06:40:21 PM »
I tried this morning to get it going again and it still failed with this in the logs:

Code: [Select]
[Sat May 15 09:38:13 2010] [error] [client 68.127.89.107] File does not exist: /home/e-smith/files/ibays/epi/html/undefined, referer: http://epi.joeman1.com/index_library.php

So there is something more that needs to happen... I will put a bug report in and see what happens...

Thanks!

Joe

Offline Joeg1484

  • *
  • 35
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #19 on: May 15, 2010, 06:52:57 PM »
Ok, posted bug 5956 to the list.

Also, to mention, I am using SME 8 beta 5, so this might be relevant to my product only. You should post as well to 7.x if you want too.

Thanks!

Joe

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #20 on: May 16, 2010, 04:35:15 AM »
Joeg1484

I do not think your problem is a bug, as Charlie says at bugzilla.
I don't use epiware so cannot be more specific than the following.

Quote
.....File does not exist: /home/e-smith/files/ibays/epi/html/undefined, referer: http://epi.joeman1.com/index_library.php

is saying the file referred to by the code in index_library.php, does not exist.
It may be that the location has not been defined correctly in the epiware config.inc.php
Check your configuration settings for epiware. There would usually be a root dir setting something like
/home/e-smith/files/ibays/epi/html/
and then other locations may be relative to that eg
just
/foldername
instead of
/home/e-smith/files/ibays/epi/html/foldername

Alternatively it may require the full path, I don't know for sure.

This post may be mildly informative, although to do with Joomla, the concept is the same.
http://forums.contribs.org/index.php/topic,45948.msg224434.html#msg224434

"Joomla (by default) uses the /tmp directory to upload files.  Have a look in /var/log/messages and see if you have open_basedir errors.  If so, either change Joomla's upload directory to somewhere within the html path or change the open_basedir value.

See PHPBaseDir db setting here: http://wiki.contribs.org/DB_Variables_Configuration#Apache_server_ibay_specific_.28httpd-e-smith.29

You may also need to chown everything under the html directory to www:www so that the web server has write access to the folders.
(Note: DO NOT chmod anything in the html directory to 777, it is not recommended, safe or necessary)."
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Joeg1484

  • *
  • 35
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #21 on: May 16, 2010, 04:46:23 AM »
Ok, I can take a look at that link for Joomla. Thanks for that!

As a side note, and I appreciate that the developers cant support EVERY app that is out there, but as I stated in the bug report just now, Hord is also not allowing me to upload stuff.

I was trying to set up pictures of people in my address book and it was doing the same thing as EPI. It would start the upload process and then just return blank. In the errors.log, there was a similar error, although not the same paths.

I checked my paths in the php config file for the EPI app, and they looked spot on (Unless I was supposed to put the trailing / on them).

We will see what happens when SME 8 is released; as I mentioned, Im using 8 beta 5 atm. I got EPI up on a VM server using Ubuntu and its working fine over there, so at least I have a temp solution for my needs.

I do appreciate your assistance with this and look forward to posting again and working though other issues :).

Take it easy!

Joe

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: How to install Epiware on SME server 7.3
« Reply #22 on: May 16, 2010, 04:47:24 AM »
manegar & Joeg1484

I see no mention in the Howto of the need to change the PHPBaseDir setting from default.
Perhaps you did that inappropriately.
I suggest you do.

db accounts delprop eroom PHPBaseDir
signal-event ibay-modify eroom

or

db accounts delprop epi PHPBaseDir
signal-event ibay-modify epi

and try again with the default settings that will be generated by the code in the templates, rather than being based on a db value.

Re-read the howto and follow it carefully.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: How to install Epiware on SME server 7.3
« Reply #23 on: May 17, 2010, 02:06:25 PM »
I also found some error in /var/log/httpd/error_log :
Thu Jan 07 16:44:21 2010] [error] [client 192.x.x.x] File does not exist: /home/e-smith/files/ibays/eroom/html/undefined, referer: http://192.x.x.x/eroom/index_library.php

You need to discover why index_library.php is trying to read a file called 'undefined' in that folder. It's either a bug or a configuration error. It does not look like a permissions problem.