LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2011, 08:56 PM   #1
ghandizzle8
Member
 
Registered: Jun 2010
Posts: 30

Rep: Reputation: 0
Symbolic Link with HTTP


Good Day All

I am having an issue viewing the symbolic link i created. I created a link to my web folder (using fedora 14). When i try to view it in a browser , i get the error: 403 Forbidden, You do not have permission to access the "file" on the server.



I did the following:
I added the below to my /etc/httpd/conf/httpd.conf file
"
<Directory “path to directory like /var/www/html/folder”>
options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride All
Order allow,deny

Allow from all

</Directory>
"
"then i restarted httpd"
However that did not work


Any help would be greatly appreciated

Regards,
Brian
 
Old 09-15-2011, 10:06 PM   #2
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
I don't think the webserver has permissions to follow symlinks that are not in the webserver directory path defined in <Directory ...></Directory>
 
Old 09-15-2011, 10:17 PM   #3
bryan641
Member
 
Registered: Mar 2011
Location: Ohio, USA
Distribution: Debian Squeeze
Posts: 40

Rep: Reputation: 14
Are you sure the folder you're sym-linking to has the proper permissions? What does it show for owner, group & permissions when you ls -l it? You need r-x or rwx for the 3rd set (public/other) unless it is owned by the web server's id or group. It's www-data on my Debian system, not sure if Fedora 14 uses the same id or if you've changed it.

--Bryan

P.S. I know this technique works, because I've placed websites I maintain in my home folder and symlink from /var/www into /home/me/www/folder and it works great.

Last edited by bryan641; 09-15-2011 at 10:19 PM.
 
Old 09-16-2011, 01:33 AM   #4
user7
LQ Newbie
 
Registered: Nov 2010
Location: Canada
Distribution: anything with a linux or bsd kernel
Posts: 7

Rep: Reputation: 3
Hey,
Well first off I hope this isn't literal
Code:
<Directory “path to directory like /var/www/html/folder
Cause that won't fly.

Second what is the ownership/permissons of the directory the symlink is referancing? It will need to be something apache can read. If you don't know then issue a
Code:
ls -la /var/www/html/folder
and depending on your distro
Code:
chown -R apache:apache /var/www/html/folder
or
Code:
chown -R www:www /var/www/html/folder
check your /etc/passwd to find out which.

Or you could chmod to something apache can read, but not write. Stay away from 777.
 
Old 09-16-2011, 01:59 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
It would help if we saw what the actual dir is, but I suspect an SELinux issue.
You may also want to consider this page https://httpd.apache.org/docs/2.2/mod/mod_userdir.html
 
Old 09-16-2011, 07:34 AM   #6
ghandizzle8
Member
 
Registered: Jun 2010
Posts: 30

Original Poster
Rep: Reputation: 0
folder is called timetable

its in my home directory e.g. /home/bhall/Dropbox/timetable ...the permissions are

drwxrwxrwx 2 apache apache 20480 Sep 16 00:26 timetable

In /var/www/html folder i created the sym link timetable

The permissions are:

lrwxrwxrwx 1 root root 10 Sept 16 00:32 timetable -> /home/bhall/Dropbox/timetable

(the way i am doing it is using dropbox to sync my files with another machine.
 
  


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
symbolic link not allowed or link target not accessible paullaubscher Linux - Newbie 4 03-10-2010 07:47 AM
Symbolic Link metallica1973 Linux - Networking 4 09-01-2008 12:13 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 08:40 AM
What is a Symbolic Link? little_penguin Linux - Software 2 05-14-2005 10:27 AM
Symbolic link bwaynej2002 Linux - General 8 08-25-2003 11:06 PM


All times are GMT -5. The time now is 10:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration