Koozali.org: home of the SME Server
Obsolete Releases => SME Server 6.x => Topic started by: Thomas on June 02, 2006, 01:45:34 AM
-
I am running SME 6.0.1. I have the contrib modIndexer installed. I have one ibay that is accessible from the Internet without a password that I would like for the files in this ibay to not be listed when an Internet user goes to http://myserver/this_ibay. Is this possible? The reason for this is this ibay holds the files for my php web application (for the moment) and I don't want a user to see these or open them.
Thanks,
Thomas
-
I am running SME 6.0.1. I have the contrib modIndexer installed. I have one ibay that is accessible from the Internet without a password that I would like for the files in this ibay to not be listed when an Internet user goes to http://myserver/this_ibay. Is this possible? The reason for this is this ibay holds the files for my php web application (for the moment) and I don't want a user to see these or open them.
Thanks,
Thomas
Issue the following commands on the command prompt:db accounts setprop ibayname Indexes disabled
expand-template /ect/httpd/conf/httpd.conf
Now the configuration is modified for this ibay but we need to load the configuration again for the changes to apply, you can simply reboot, or just restart the httpd service, but I don't remember the exact command for this on SME 6. On SME 7 it should go like this:/etc/rc7.d/S86httpd-e-smith sigusr1
-
Hey cactus, when I type "db accounts setprop ibayname Indexes disabled"at the command prompt and hit enter I get "bash: db: command not found"
What do I do now?
Thanks,
Thomas
-
Well after some more searching I found the commands are:
/sbin/e-smith/db accounts setprop ibayname Indexes disabled
/sbin/e-smith/expand-template /ect/httpd/conf/httpd.conf
I then rebooted, BUT, going to http://www.mydomain/ibayname still lists the files there. How can I stop theses files from being listed? Remember I have modIndexer running.
Thanks,
Thomas
-
Anyone?
-
Here are a couple more ways to affect "Indexes" that might work for you:
1. Create an "index.html" file in your i-bay that displays a blank page, an error message, or redirects the visitor to another site - then the autoindex function will never be invoked.
or
2. Create a custom template fragment that turns off indexing for the i-bay in question (note: the name I've given here is arbitrary, but must begin with a number high enough to cause 'expand-template' to add your content at the end of httpd.conf, so that your "Options -Indexes" will not be overruled by another setting later in the file)
# pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/96TurnOffIbayIndexing
then add this content:
<Directory /home/e-smith/files/ibays/[ibayname]/html/ >
Options -Indexes
</Directory>
(be sure to replace [ibayname] with the name of your i-bay).
Then:
sbin/e-smith/expand-template /ect/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith restart
-
I just needed a quick fix for now and the index.html works perfectly! I'll try the other way later.
THANKS!
PS - still wondering why the stuff cactus suggested didn't work....
-
When I do
/sbin/e-smith/db accounts show
I only get the following items for each i-bay on 6.01 (with the "smeplus.sh" upgrades):
xxx=ibay
CgiBin=enabled
Gid=5001
Group=shared
Name=ibay name
PasswordSet=no
PublicAccess=global
Uid=xxxx
UserAccess=wr-group-rd-everyone
Since there's nothing in here about "Indexes" I wonder if the "Indexes" support was put in for 6.5 or 7, and just doesn't work in 6.0.
This is just a guess, though!