Koozali.org: home of the SME Server

files Directory in an ibay not accessible from web

Offline Gert

  • ****
  • 208
  • +0/-0
    • http://www.huge.co.za
files Directory in an ibay not accessible from web
« on: December 01, 2009, 05:34:38 PM »
Why is it not possible to create a folder with the name "files" in the root dir of an ibay and access the contents through a web browser? But if you rename the file to anything else like e.g. "files2" then it is accessible. Rename it back to "files" and you get the same error again:  "Forbidden   You don't have permission to access /files/ on this server."

is this a bug?

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: files Directory in an ibay not accessible from web
« Reply #1 on: December 02, 2009, 12:18:54 AM »
Gert

There is already a folder named files in every ibay.
Please read the ibay section of the manual as I'm sure it's mentioned.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: files Directory in an ibay not accessible from web
« Reply #2 on: December 02, 2009, 12:20:56 AM »
/ibayname/files is created automatically for each ibay as an apache alias to /home/e-smith/files/ibays/ibayname/files.

For each ibay the following directory tree is created:
/home/e-smith/files/ibays/<ibayname>
/home/e-smith/files/ibays/<ibayname>/html
/home/e-smith/files/ibays/<ibayname>/cgi-bin
/home/e-smith/files/ibays/<ibayname>/files

.../html is the "root" of the ibay, and is intended to hold the html files for that ibay.

.../cgi-bin is intended to hold any server-side programs required by the ibay.  It is kept outside of the .../html folder to improve security.

.../files is intended for file storage, and (like .../cgi-bin) is kept outside of the html folder to improve security.


Offline Gert

  • ****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: files Directory in an ibay not accessible from web
« Reply #3 on: December 02, 2009, 03:12:29 AM »
Thank you for the reply. Yes I am well aware of that, but maybe I was not clear enough with my question.

If you create a folder in the html folder of an ibay e.g /home/e-smith/files/ibays/<ibayname>/html/files you will not be able to access it from the web.

My problem is this, I have created an ibay for a cms web app (concrete5). Most excellent app by the way. Now one of the folders of concrete5 is called "files", which stores images and other files that the cms uses. But because the "files" folder in the "html" folder of an ibay (which in this case belongs to concrete5) is not accessible from the web, the app is not working properly.

To overcome this issue i have created a folder in the "html" folder and copied the files and folders for concrete5 in it, instead of just in the "html" folder and now it works fine. but now my website url is www.mydomain.com/folder instead of just www.mydomain.com

I hope this clarifies my question.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: files Directory in an ibay not accessible from web
« Reply #4 on: December 02, 2009, 01:10:35 PM »
Gert

Quote
If you create a folder in the html folder of an ibay e.g /home/e-smith/files/ibays/<ibayname>/html/files you will not be able to access it from the web.

That's because when you try to access
http:/yourdomain/ibayname/files
it preferentially looks in
/home/e-smith/files/ibays/ibayname/files

ie .../ibayname/files takes precedent over ..../ibayname/html/files


Quote
To overcome this issue i have created a folder in the "html" folder and copied the files and folders for concrete5 in it, instead of just in the "html" folder and now it works fine. but now my website url is www.mydomain.com/folder instead of just www.mydomain.com

You could move/install the app to /opt/concrete5 and change the alias and other config to suit

or

You could move the content in
/home/e-smith/files/ibays/ibayname/html/files
to
/home/e-smith/files/ibays/ibayname/files
although I'm not sure if that would work.
You may need to fiddle with absolute path settings in the apps config files

« Last Edit: December 02, 2009, 01:13:10 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Gert

  • ****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: files Directory in an ibay not accessible from web
« Reply #5 on: December 09, 2009, 09:30:48 PM »
I installed the app in /opt but then i coud'nt get it to be my primary website.

What i did to solve my problem is as follows:

created a custom template of  /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent
commented out the following 2 lines:
#    $OUT .= "    Alias       /files   $basedir/files\n";
#    $OUT .= "    Alias       /$key/files   $basedir/files\n";

expand-template and restart httpd-e-smith

Now i am able to access /files in html and my app works fine.