logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Symlink problem, Apache is not following or no permission
Author
andreasw



Joined: 08 Oct 2012
Posts: 3
Location: Germany, Essen

PostPosted: Tue 09 Oct '12 0:11    Post subject: Symlink problem, Apache is not following or no permission Reply with quote

I am running CentOS 6.3, Apache 2.2.15.
Document root is /var/www/html
virtual servers ar in subdirs "15", "16".
I have an index.html in each dir to verify were I am.
FollowSymLinks is enabled.
I have a 2nd HDD mounted at /media/hdd2 with a directory "data" with a index.html in it. In "/var/www/html/16" I have a symlink "sixteen" ther in a folder "dataa" pointing at "/media/hdd2/data". "/media" and "media/hdd2" is root owned and 40777. all below is apache ownd, files are 10777.
in the doc root everythink (including the link is apache owned. I guess I must be missing something. It does not work...
With [server-ip]/somepage.html it works. But when I comeacross the link ... nothing. /"data/index.html" should work but nothing.
Error message: 403 Forbidden, "no permission".
I have a few days now and running out of ideas.

Maybe anyone can help.
Thanks,
Andreasw.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Oct '12 11:02    Post subject: Reply with quote

Hi Andreasw,
you have also to allow the access inside apache, as you did for the document root. Since the path in only a virtual one the permission from /var/www/html will not be inherited to those folder.

Add something like
Code:

<Directory "/media/hdd2/data">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order Allow,Deny
   Allow from all
</Directory>
Back to top
andreasw



Joined: 08 Oct 2012
Posts: 3
Location: Germany, Essen

PostPosted: Tue 09 Oct '12 20:55    Post subject: Reply with quote

James Blond wrote:
Hi Andreasw,
you have also to allow the access inside apache, as you did for the document root. Since the path in only a virtual one the permission from /var/www/html will not be inherited to those folder.


Thanks, here it is:
<Directory "/media/hdd2/data">
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>

This is the dir in the root
lrwxrwxrwx. 1 apache apache 19 Oct 9 20:40 sechzehn -> /media/hdd2/data/16

And this is the media/hdd2/data
drwxrwxrwx. 2 apache apache 4096 Oct 9 20:41 16

and this is below:
[root@cloud 16]# ls -l
total 4
-rwxrwxrwx. 1 apache apache 63 Oct 8 22:14 index.html

Thank you for any idea ...

andreasw.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Oct '12 23:07    Post subject: Reply with quote

I'm a bit stuck now. But what I would try is to add an Alias instead of the symlink.

Code:

Alias /15 /media/hdd2/data/15
<Directory "/media/hdd2/data/15">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order Allow,Deny
   Allow from all
</Directory>

Alias /16 /media/hdd2/data/16
<Directory "/media/hdd2/data/16">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order Allow,Deny
   Allow from all
</Directory>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Oct '12 23:13    Post subject: Reply with quote

I'm a bit confused? Did it help or not? Your quote is not clear to me Wink
Back to top
andreasw



Joined: 08 Oct 2012
Posts: 3
Location: Germany, Essen

PostPosted: Wed 10 Oct '12 14:38    Post subject: Reply with quote

James Blond wrote:
I'm a bit confused? Did it help or not? Your quote is not clear to me Wink


me too. Fireing up the browser reopening the tabs did a second entry of my posting.

I'll try later today Wink
Back to top


Reply to topic   Topic: Symlink problem, Apache is not following or no permission View previous topic :: View next topic
Post new topic   Forum Index -> Apache