LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-01-2012, 07:10 PM   #16
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23

these are all my files in the directory (I removed the install ect to cut down on space)

[root@www webdata]# ls -lad *
-rw-r--r--. 1 web01 apache 6780 Jun 8 2011 authorize.php
-rw-r--r--. 1 web01 apache 59332 Jun 8 2011 CHANGELOG.txt
-rw-r--r--. 1 web01 apache 1021 Jun 8 2011 COPYRIGHT.txt
-rw-r--r--. 1 web01 apache 746 Jun 8 2011 cron.php
drwxr-x---. 4 web01 apache 4096 Jan 30 15:59 includes
-rw-r--r--. 1 web01 apache 550 Jun 8 2011 index.php
-rw-r--r--. 1 web01 apache 1489 Jun 8 2011 INSTALL.mysql.txt
-rw-r--r--. 1 web01 apache 1918 Jun 8 2011 INSTALL.pgsql.txt
-rw-r--r--. 1 web01 apache 1329 Jun 8 2011 INSTALL.sqlite.txt
-rw-r--r--. 1 web01 apache 18254 Jun 8 2011 INSTALL.txt
-rw-r--r--. 1 web01 apache 15214 Jun 8 2011 LICENSE.txt
-rw-r--r--. 1 web01 apache 7592 Jun 8 2011 MAINTAINERS.txt
drwxr-x---. 4 web01 apache 4096 Jan 30 15:59 misc
drwxr-x---. 56 web01 apache 4096 Feb 1 10:45 modules
-rw-r--r--. 1 web01 apache 714 Jun 8 2011 Org_install_php
drwxr-x---. 5 web01 apache 4096 Jan 30 15:59 profiles
-rw-r--r--. 1 web01 apache 3582 Jun 8 2011 README.txt
-rw-r--r--. 1 web01 apache 1537 Jun 8 2011 robots.txt
drwxr-x---. 2 web01 apache 4096 Jan 30 15:59 scripts
drwxr-x---. 4 web01 apache 4096 Jan 30 15:59 sites
drwxr-x---. 9 web01 apache 4096 Jan 30 15:59 themes
drwxr-x---. 2 web01 apache 4096 Jan 30 15:59 tutorial
-rw-r--r--. 1 web01 apache 18685 Jun 8 2011 update.php
-rw-r--r--. 1 web01 apache 9035 Jun 8 2011 UPGRADE.txt
-rw-r--r--. 1 web01 apache 2051 Jun 8 2011 web.config
-rw-r--r--. 1 web01 apache 435 Jun 8 2011 xmlrpc.php
 
Old 02-01-2012, 07:20 PM   #17
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
That is the correct file.
I've recent created a new Drupal 7 site in Ubuntu 10.04, and get 403 error when trying to access /modules directory.

The two other ideas I have are related to rewrite rules.

Also, drop the * at the end of the ls command it works a little better with out it.
 
Old 02-01-2012, 07:26 PM   #18
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
This is all of my files in my webdata directory and all of my permissions, I am baffled at why I am still able to access the www.sitename.com/modules

I can access

www.sitename.com/scripts

without any problems?

The only things I changed in the /etc/httpd/conf (httpd.conf)

was:

DocumentRoot "/var/www/webdata"
<Directory "/var/www/webdata">

that is the only things I changed

[root@www www]# pwd;ls -lad webdata
/var/www
drwxr-x---. 10 web01 apache 4096 Feb 1 18:54 webdata



[root@www webdata]# ls -l
total 220
-rw-r--r--. 1 web01 apache 6780 Jun 8 2011 authorize.php
-rw-r--r--. 1 web01 apache 59332 Jun 8 2011 CHANGELOG.txt
-rw-r--r--. 1 web01 apache 1021 Jun 8 2011 COPYRIGHT.txt
-rw-r--r--. 1 web01 apache 746 Jun 8 2011 cron.php
drwxr-x---. 4 web01 apache 4096 Jan 30 15:59 includes
-rw-r--r--. 1 web01 apache 550 Jun 8 2011 index.php
-rw-r--r--. 1 web01 apache 1489 Jun 8 2011 INSTALL.mysql.txt
-rw-r--r--. 1 web01 apache 1918 Jun 8 2011 INSTALL.pgsql.txt
-rw-r--r--. 1 web01 apache 1329 Jun 8 2011 INSTALL.sqlite.txt
-rw-r--r--. 1 web01 apache 18254 Jun 8 2011 INSTALL.txt
-rw-r--r--. 1 web01 apache 15214 Jun 8 2011 LICENSE.txt
-rw-r--r--. 1 web01 apache 7592 Jun 8 2011 MAINTAINERS.txt
drwxr-x---. 4 web01 apache 4096 Jan 30 15:59 misc
drwxr-x---. 56 web01 apache 4096 Feb 1 10:45 modules
-rw-r--r--. 1 web01 apache 714 Jun 8 2011 Org_install_php
drwxr-x---. 5 web01 apache 4096 Jan 30 15:59 profiles
-rw-r--r--. 1 web01 apache 3582 Jun 8 2011 README.txt
-rw-r--r--. 1 web01 apache 1537 Jun 8 2011 robots.txt
drwxr-x---. 2 web01 apache 4096 Jan 30 15:59 scripts
drwxr-x---. 4 web01 apache 4096 Jan 30 15:59 sites
drwxr-x---. 9 web01 apache 4096 Jan 30 15:59 themes
drwxr-x---. 2 web01 apache 4096 Jan 30 15:59 tutorial
-rw-r--r--. 1 web01 apache 18685 Jun 8 2011 update.php
-rw-r--r--. 1 web01 apache 9035 Jun 8 2011 UPGRADE.txt
-rw-r--r--. 1 web01 apache 2051 Jun 8 2011 web.config
-rw-r--r--. 1 web01 apache 435 Jun 8 2011 xmlrpc.php

Last edited by rhbegin; 02-01-2012 at 07:28 PM.
 
Old 02-01-2012, 07:26 PM   #19
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
For completeness the two things i was refering to are

run
Code:
a2enmod rewrite
and
Make sure the AllowOverride is set to ALL
In Ubuntu it looks close to this
In File: /etc/apache2/sites-available/default
Code:
.....
<Directory /var/www/>
    AllowOverride ALL
.....
 
Old 02-01-2012, 07:30 PM   #20
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
Your file permissions appear to be set correct, now it is looking like there is an Apache configuration that is missing.
 
Old 02-01-2012, 07:35 PM   #21
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
[root@www ~]# a2enmod rewrite
-bash: a2enmod: command not found


do you know what package will include this?
 
Old 02-01-2012, 07:39 PM   #22
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
Apparently Ubuntu breaks things up.
You'll want to edit the /etc/httpd/conf/httpd.conf to uncomment the rewrite module line.

http://serverfault.com/questions/563...line-in-redhat
 
Old 02-01-2012, 07:46 PM   #23
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
LoadModule rewrite_module modules/mod_rewrite.so


it was uncommented by default

I have cycled httpd but no go?

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_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 substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

all of these are default

Last edited by rhbegin; 02-01-2012 at 07:49 PM.
 
Old 02-01-2012, 07:50 PM   #24
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
Does the Drupal site work? Creating content, displaying, etc.
 
Old 02-01-2012, 07:54 PM   #25
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
This is what should be protecting things
Code:
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|En tries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
From the .htaccess file
 
Old 02-01-2012, 07:55 PM   #26
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
The site works, I am just baffled about the access to the /modules and other directories that will be exploited.

Is there something I am missing, do you have CentOS 6 by chance to mimic my setup?
 
Old 02-01-2012, 07:57 PM   #27
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
I am able to edit the site, the problem I had originally was I would do the following:

my /var/www/webdata directory had 755 on it

I would change the sub directories to 751 (so I would get a permission denied when I tried to navigate to /modules /scripts ect..)

However this would break Drupal, which I had to change it back and reading forums.
 
Old 02-01-2012, 07:58 PM   #28
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\.. *|En tries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>

Question would I need to place this code in my (httpd.conf) file by chance???

I tried this in my httpd.conf file under .htaccess

but I am still able to view /modules

???

Last edited by rhbegin; 02-01-2012 at 08:01 PM.
 
Old 02-01-2012, 08:00 PM   #29
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
I'll have access to Fedora 16 later tonight, i can set things up on.
You shouldn't need to, but try it and if it works that should point to .htaccess not being read properly as the issue.
Just make sure to restart the server after the edit.
 
Old 02-01-2012, 08:05 PM   #30
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Original Poster
Rep: Reputation: 23
I restarted httpd and it is still a no go.

would it be possible to give you a call?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My server came with apache and centos 5 installed but need help. shadiadiph Linux - Server 11 07-05-2009 09:25 PM
Apache/PHP CMS (Drupal) problem KrazyKanuk Linux - Software 1 11-23-2008 02:59 AM
Permissions Apache and CentOS Mr. Slappy Linux - Server 1 07-09-2007 03:57 PM
repost - Apache 2.2.3 on Centos 5 (RHEL5) permissions issue djjoshuad Red Hat 2 04-19-2007 04:47 AM
Drupal Apache Config problem - incorrect URLS TippExed Linux - Software 0 06-02-2005 06:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration