View previous topic :: View next topic |
Author |
Message |
SDraconis n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 20 Apr 2005 Posts: 53
|
Posted: Sun Jun 05, 2005 10:01 pm Post subject: Apache2 Symlink security [Solved] |
|
|
I was wondering if there is any way to limit symlinks to not be followed outside of a certain directory. I have a user who has a small site hosted in ~/public_html that requires symlinks within the directory in order to properly function. However, I do not want it to be possible for the user to make a symlink to some other directory outside of ~/public_html and have that publicly available on the net. Ideally, this would be a per-directory setting so I could still allow symlinks to anywhere to be followed from the main /var/www site.
Last edited by SDraconis on Sun Jun 05, 2005 10:48 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sun Jun 05, 2005 10:43 pm Post subject: |
|
|
FollowSymlinksIfOwnerMatch is what you want.
See the apache docs for more.
Side note: no, you did not read them - if you had, you would know that everything in apache is configurable per-directory ![Wink ;-)](images/smiles/icon_wink.gif) _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
SDraconis n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 20 Apr 2005 Posts: 53
|
Posted: Sun Jun 05, 2005 10:48 pm Post subject: |
|
|
Thanks, and sorry. You're right, I had read a guide on configuring Apache2 and flipped through forum posts rather than the full docs. I should've known better and looked into the full documentation for the directives. As for the configuration per directory part, I already knew that everything was configurable per directory as I had already messed with some directives on certain directories. The reason I had said that was in case someone offered a solution that wasn't actually built in to Apache itself.
Edit: I believe the directive is actually called SymLinksIfOwnerMatch now rather than FollowSymlinksIfOwnerMatch
Last edited by SDraconis on Mon Jun 06, 2005 1:11 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sun Jun 05, 2005 11:01 pm Post subject: |
|
|
Well, this one is, and as you can easily surmise yourself, as long as the files linked to are owned by the user whose directory they are in, it should all work as advertised.
For a given value of "advertised" ![Wink ;-)](images/smiles/icon_wink.gif) _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|