View Full Version : Bastille-Linux
Ron Stanyard 05-02-2002, 06:52 PM Hello I'm having a little problem and was curious if anyone could help me.
I have installed Bastille-Linux on my server and now when I access http://myip/~user (replacing "myip" with my ip address and "~user with a valid username) it says it is "Forbidden". I am still able to access http://myip but just not the user directories. I put a public_html directory in the user directory with an index.html file in it and have checked permissions of the directories and html file to make sure it is readable to everyone yet it still does not work. The system is running Red Hat 7.1
I am thinking Bastille-Linux did something to my configuration, can anyone please help?
Thanks,
Ron
mkaufman 05-02-2002, 06:56 PM It doesn't work that way.....add different virtual host entries
Ron Stanyard 05-02-2002, 09:08 PM Apache should authomatically allow ~/user access to the web, that's the way it has been...but now it won't work....
The following is uncommented and in my /etc/httpd/conf/httpd.conf file and http://myip/~username still does not work.
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
Please please help.
Your problem could mean a couple of things:
1) UserDir is not defined in httpd.conf. I like to use "www" for
the userdir
2) Directory index is not defined in httpd.conf. Most people use
index.htm, index.html or something like that.
If both of those are set, then is it possible that index.htm doesn't exist.
bobcares 05-02-2002, 09:41 PM Hi!
Could you please try as
http://myip/~user/filename.html
Let me know if it works.
Also try httpd -l ad let us know the complied modules.
Have a great day :)
regards
amar
Ron Stanyard 05-03-2002, 12:34 AM The UserDir is later defined as public_html and the Directory index is defined as index.html index.htm etc etc
http://myip/~user/filename.html does not work. It gives me the same error: "Forbidden"
I ran a find command for the command "httpd" and cannot find it, sorry. Could you please tell me? In the httpd.conf file here are the modules though.
LoadModule vhost_alias_module modules/mod_vhost_alias.so
<IfDefine HAVE_BANDWIDTH>
LoadModule bandwidth_module modules/mod_bandwidth.so
</IfDefine>
<IfDefine HAVE_THROTTLE>
LoadModule throttle_module modules/mod_throttle.so
</IfDefine>
LoadModule env_module modules/mod_env.so
LoadModule config_log_module modules/mod_log_config.so
LoadModule agent_log_module modules/mod_log_agent.so
LoadModule referer_log_module modules/mod_log_referer.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule status_module modules/mod_status.so
LoadModule info_module modules/mod_info.so
LoadModule includes_module modules/mod_include.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule asis_module modules/mod_asis.so
LoadModule imap_module modules/mod_imap.so
LoadModule action_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule anon_auth_module modules/mod_auth_anon.so
LoadModule db_auth_module modules/mod_auth_db.so
#LoadModule auth_any_module modules/mod_auth_any.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule auth_ldap_module modules/mod_auth_ldap.so
#LoadModule mysql_auth_module modules/mod_auth_mysql.so
#LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule proxy_module modules/libproxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule example_module modules/mod_example.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
<IfDefine HAVE_PERL>
LoadModule perl_module modules/libperl.so
</IfDefine>
<IfDefine HAVE_PHP>
LoadModule php_module modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>
<IfDefine HAVE_DAV>
LoadModule dav_module modules/libdav.so
</IfDefine>
<IfDefine HAVE_ROAMING>
LoadModule roaming_module modules/mod_roaming.so
</IfDefine>
<IfDefine HAVE_SSL>
LoadModule ssl_module modules/libssl.so
</IfDefine>
<IfDefine HAVE_PUT>
LoadModule put_module modules/mod_put.so
</IfDefine>
<IfDefine HAVE_PYTHON>
LoadModule python_module modules/mod_python.so
</IfDefine>
I'm sorry if this is not the correct info.
Thanks for all the input.
Originally posted by Ron Stanyard
The UserDir is later defined as public_html and the Directory index is defined as index.html index.htm etc etc
http://myip/~user/filename.html does not work. It gives me the same error: "Forbidden"
<snip>
Thanks for all the input.
What are the permissions of /home/username and /home/username/public_html?
Maybe your parent directory has the wrong permissions. For instance if your public_html folders are in /home/username/public_html then /home/user could be mode 700 or something. The parent directory needs to be mode 711 or 755 so try 'chmod 711 /home/username'.
Ron Stanyard 05-03-2002, 03:58 AM I changed the permissions to the ~username directory and now it doesn't give a "Forbidden" but it just acts like the page doesn't exit and gives me this following error:
Internet Explorer returns an error on the address you just entered or clicked
This could be caused by:
The Web site you are looking for may be temporarily unavailable.
Your Web connection was temporarily slow because of the traffic.
You may have entered the address incorrectly.
The site may no longer exist.
Thanks bofh for giving me some progress in this problem.
I still basically get a 404, file not found. So a problem still exists, any ideas?
*caugh* Bastille-Linux makes for a lazy admin *caugh*
*caugh* go buy maximum-security or a good linux book and Learn how to do what bastile does ... or now wait, look at the scripts sources -- it only shows you Everything. *caugh*
P.S. Dont let bastile present you with a false sence of security..... a false sence of security is perhaps worse than no security at all...
Ron Stanyard 05-03-2002, 09:40 PM I realize this but I am just using Bastille temporarily until I am able to learn more about security. So if anyone could help with my current problem I would appreciate it. Thanks.
Originally posted by Ron Stanyard
I changed the permissions to the ~username directory and now it doesn't give a "Forbidden" but it just acts like the page doesn't exit and gives me this following error:
<snip>
I still basically get a 404, file not found. So a problem still exists, any ideas?
Now that you can get to the directory try http://yourip/~username/somefile.htm and see if you can see it now.
just for reference - apache likes to see the following permissions:
/home/user = 711
/home/user/public_html = 755
setting permissions as such, should not give you a 403 forbidden error.
Ron Stanyard 05-06-2002, 02:52 AM Thank you for the advice. I got http://myip/~user/ working but now it requires that I have a / at the end of the username. How do I get it so that it is only http://myip/~user so that it doesn't require a / at the end. Thanks.
:) what did you do to fix the old problem?
because that just might help us fix the new problem
billyjoe 05-07-2002, 01:16 PM That problem is well documented in the Apache Server FAQ Ron, might want to take a look at that.
|