Apache root Access Forbidden

As I convert from Windows to Suse, I want to keep my email stores and my web dev. file stores the same. Thunderbird is happy in Suse to use my NTFS email store, including read/write, but Apache is not yet. :slight_smile:

My fstab has:


/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part7 /home                ext3       acl,user_xattr        1 2
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part6 swap                 swap       defaults              0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part5 /                    ext3       acl,user_xattr        1 1
#Device    Mountpoint  Filesystem  Parameters
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part2  /windows/D  ntfs-3g     user,users,gid=users,umask=0002  0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part3  /windows/E  ntfs-3g     user,users,gid=users,umask=0002  0 0

proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Which I think is supposed to mount /Windows/E and allow read/write for all users. In default-server.conf I have:


#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
# 

DocumentRoot "/windows/E/ApacheRoot/"

#
# Configure the DocumentRoot
#
<Directory "/windows/E/ApacheRoot/">
   	# Possible values for the Options directive are "None", "All",
	# or any combination of:
	#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
	#
	# Note that "MultiViews" must be named *explicitly* --- "Options All"
	# doesn't give it to you.
	#
	# The Options directive is both complicated and important.  Please see
	# http://httpd.apache.org/docs-2.2/mod/core.html#options
	# for more information.
Options None
   	# AllowOverride controls what directives may be placed in .htaccess files.
	# It can be "All", "None", or any combination of the keywords:
	#   Options FileInfo AuthConfig Limit
AllowOverride None
   	# Controls who can get stuff from this server.
Order allow,deny
 Allow from all
</Directory>

which I wanted to set the root to be the dir ApacheRoot on that disk. But when I browse to localhost I get Access forbidden.

Anyone know how I can fix this?

Thanks!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can you, with a normal dumb (non-root) user, go into the directory where
your web files reside, and read them somehow? ‘cat’ or ‘less’ would
probably be sufficient. Otherwise check the /var/log/apache2/error_log
file.

Good luck.

FredTheJonester wrote:
> As I convert from Windows to Suse, I want to keep my email stores and my
> web dev. file stores the same. Thunderbird is happy in Suse to use my
> NTFS email store, including read/write, but Apache is not yet. :slight_smile:
>
> My fstab has:
>
>
> Code:
> --------------------
>
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part7 /home ext3 acl,user_xattr 1 2
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part6 swap swap defaults 0 0
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part5 / ext3 acl,user_xattr 1 1
> #Device Mountpoint Filesystem Parameters
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part1 /windows/C ntfs-3g user,users,gid=users,umask=0002 0 0
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part2 /windows/D ntfs-3g user,users,gid=users,umask=0002 0 0
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEL330RC09N28B-part3 /windows/E ntfs-3g user,users,gid=users,umask=0002 0 0
>
> proc /proc proc defaults 0 0
> sysfs /sys sysfs noauto 0 0
> debugfs /sys/kernel/debug debugfs noauto 0 0
> usbfs /proc/bus/usb usbfs noauto 0 0
> devpts /dev/pts devpts mode=0620,gid=5 0 0
>
> --------------------
>
>
> Which I think is supposed to mount /Windows/E and allow read/write for
> all users. In default-server.conf I have:
>
>
> Code:
> --------------------
>
> #
> # Global configuration that will be applicable for all virtual hosts, unless
> # deleted here, or overriden elswhere.
> #
>
> DocumentRoot “/windows/E/ApacheRoot/”
>
> #
> # Configure the DocumentRoot
> #
> <Directory “/windows/E/ApacheRoot/”>
> # Possible values for the Options directive are “None”, “All”,
> # or any combination of:
> # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
> #
> # Note that “MultiViews” must be named explicitly — “Options All”
> # doesn’t give it to you.
> #
> # The Options directive is both complicated and important. Please see
> # http://httpd.apache.org/docs-2.2/mod/core.html#options
> # for more information.
> Options None
> # AllowOverride controls what directives may be placed in .htaccess files.
> # It can be “All”, “None”, or any combination of the keywords:
> # Options FileInfo AuthConfig Limit
> AllowOverride None
> # Controls who can get stuff from this server.
> Order allow,deny
> Allow from all
> </Directory>
> --------------------
>
>
> which I wanted to set the root to be the dir ApacheRoot on that disk.
> But when I browse to localhost I get Access forbidden.
>
> Anyone know how I can fix this?
>
> Thanks!
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI8h9C3s42bA80+9kRApGfAJ4mwOhsvoWkCIIP6TZTlmc+YWAhZgCffcIZ
lmV4BrlBnSDnEXYLKTskplA=
=LpxD
-----END PGP SIGNATURE-----

> Can you, with a normal dumb (non-root) user, go into the directory where
your web files reside, and read them somehow? ‘cat’ or ‘less’ would
probably be sufficient.

Yes, my regular user has read/write privileges in fact. I tested that.

> Otherwise check the /var/log/apache2/error_log
file.

Good idea. I reset the docroot to the default one and added a symbolic link to my NTFS files. Now localhost works but localhost/MySymbolicLink shows the same error.

Seems odd, b/c my regular user does have read/write rights.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hmmm… try the following and post the results:

ls -al /windows/E/

Good luck.

FredTheJonester wrote:
>> Can you, with a normal dumb (non-root) user, go into the directory
> where
> your web files reside, and read them somehow? ‘cat’ or ‘less’ would
> probably be sufficient.
>
> Yes, my regular user has read/write privileges in fact. I tested that.
>
>> Otherwise check the /var/log/apache2/error_log
> file.
>
> Good idea. I reset the docroot to the default one and added a symbolic
> link to my NTFS files. Now localhost works but localhost/MySymbolicLink
> shows the same error.
>
> Seems odd, b/c my regular user does have read/write rights.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI8rMv3s42bA80+9kRAtNXAJ97Rzf1E0CVT2BUtWQFtXHahowIhwCfUr0n
QXeY6RSa5muG/TLmXSw+Xrg=
=UM5w
-----END PGP SIGNATURE-----

Here you are:


fred@linux-p77i:~> ls -al /windows/E/
total 170922
drwxrwxr-x 1 root users    24576 2008-10-13 14:10 .
drwxr-xr-x 5 root root      4096 2008-10-12 09:13 ..
-rwxrwxr-x 2 root users    26040 2008-08-17 19:21 admin_menu-6.x-1.0.tar.gz
-rwxrwxr-x 1 root users     1794 2008-08-14 11:46 amex.gif
drwxrwxr-x 1 root users     8192 2008-09-21 05:52 ApacheRoot
-rwxrwxr-x 2 root users  2228534 2008-10-13 10:44 audacity-win-1.2.6.exe
drwxrwxr-x 1 root users        0 2008-05-22 16:02 backups
drwxrwxr-x 1 root users     4096 2008-09-15 16:04 Keter's Family
lrwxrwxr-x 1 root users       50 2008-10-12 12:49 Link to ApacheRoot -> /windows/E/ApacheRoot
-rwxrwxr-x 2 root users        0 2008-07-28 14:49 localhost.sql.zip
-rwxrwxr-x 2 root users     4316 2008-08-14 11:31 tarra-portrait2.jpg
drwxrwxr-x 1 root users        0 2008-05-21 13:21 Thunderbird Mail
drwxrwxr-x 1 root users        0 2008-09-23 23:07 tmp
drwxrwxr-x 1 root users        0 2008-05-28 13:36 var
drwxrwxr-x 1 root users     4096 2008-10-12 16:34 Virtual Machines
drwxrwxr-x 1 root users        0 2008-05-27 12:33 Windows Drivers
fred@linux-p77i:~>

What is odd is that Thunderbird is pointing to

/windows/E/Thunderbird Mail/Local Folders

and it works fine–it reads and writes.

Something else odd is that I have some tool installed on my Windows 2K to allow it to read/write ext3 partitions and while it works fine for Debian and Ubuntu, it doesn’t work for my suse ext3’s.

I had another idea–to use an Ubuntu ext3 partition for these files. They aren’t in my fstab file but at least one (the one with a label) shows up anyway in suse:


fredl@linux-p77i:~> ls -al /ubuntuhome
total 15149200
drwxr-xr-x  5 root    root        4096 2008-10-12 19:28 .
drwxr-xr-x 22 root    root        4096 2008-10-21 19:05 ..
drwx------  2 root    root       16384 2008-10-10 03:45 lost+found
drwxr-xr-x  2 root    root        4096 2008-10-12 19:28 Recycled
-rw-r--r--  1 root    root 16045388800 2008-10-06 20:18 WIn Vista.vdi

Now if I could just get write access to this partition as a regular user, then I think I would be all set. Presently I can only read.

Thanks!

Hi…couple things did you make this link?

lrwxrwxr-x 1 root users 50 2008-10-12 12:49 Link to ApacheRoot -> /windows/E/ApacheRoot

If I am reading your ls correctly you listed the contents of /windows/E/…that is a bogus softlink as you have the softlink named the same thing as the directory…well except for the addition of spaces in the link name (not a good thing to do in Linux, use the underscore instead). I would remove that softlink as Apache conf already is pointed to the full directory /windows/E/ApacheRoot.

Also, apache looks for index.html or index.htm or some other specified file (done in the server.conf). If it does not see that in its www root it will reject access. You may need to tweak the apache conf file (look for the section called DirectoryIndex) to let it know what it is looking for…say index.jsp or whatever your specific default web page is.

Reference the W2K accessing SUSE, might want to check your firewall settings if you opted for it.

Hope that helps a bit, or might possibly prompt some other ideas. What did the error log file say?

Cheers

Yes, I made that link but it’s nothing–I don’t use it. I just was playing around. I copied it to /srv/www/htdocs
and renamed it


fredl@linux-p77i:~> ls -al /srv/www/htdocs
total 48
drwxr-xr-x 3 root root 4096 2008-10-12 12:50 .
drwxr-xr-x 5 root root 4096 2008-10-12 07:51 ..
-rw-r--r-- 1 root root 2205 2005-12-14 18:25 apache_pb22_ani.gif
-rw-r--r-- 1 root root 2410 2005-12-14 18:25 apache_pb22.gif
-rw-r--r-- 1 root root 1502 2005-12-14 18:25 apache_pb22.png
-rw-r--r-- 1 root root 2326 2004-11-20 22:16 apache_pb.gif
-rw-r--r-- 1 root root 1385 2004-11-20 22:16 apache_pb.png
lrwxrwxrwx 1 root root   21 2008-10-12 12:50 ApacheRoot -> /windows/E/ApacheRoot
-rw-r--r-- 1 root root  302 2006-04-28 18:00 favicon.ico
drwxr-xr-x 2 root root 4096 2008-10-12 07:45 gif
-rw-r--r-- 1 root root   44 2004-11-20 22:16 index.html
-rw-r--r-- 1 root root 2356 2008-06-07 03:10 info2html.css
-rw-r--r-- 1 root root   26 2008-06-07 02:47 robots.txt

Apache now points there BTW. I can thus confirm that it works fine because http://localhost/ works. But accessing http://localhost/ApacheRoot/phpinfo.php or http://localhost/ApacheRoot/index.htm I get


Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
localhost
Tue Oct 21 20:22:41 2008
Apache/2.2.8 (Linux/SUSE)

which is a permissions issue, not an Apache error AFAIK.