Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-11-2004, 05:31 PM   #1
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
help with symbolic links

Help! i would like to link a folder in my /home/user folder to my www root folder so apache/the web can read my files

this is only temp. until the domain name registers, so for a short time i would like to have refer to /home/users/tempwww

can i do it, possibly with a sym. link??

thank you much in advance
Old 06-11-2004, 05:39 PM   #2
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
I personally have not tried it, but I would imagine as long as you make sure that the directory you want to link to has proper permissions, I think it would work with a sym link. On the other hand, are you sure that you want to do something like this? I am far from the most knowledgable linux security guru, but what you want sounds dangerous as anyone would be able to get into your files and delete/corrupt them and you would be unable to logon properly. But this is just a shot in the dark answer, so please take my advice with a grain of salt. Hope that helps out!

Old 06-11-2004, 06:17 PM   #3
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
I haven't specifically tried it, but I don't see that there would be a problem with a symlink as long as the directory you point to has the appropriate permissions.

Apache has a feature to look in a user's directory for html files. Perhaps not exactly what you're hoping for (url-wise), but here's what this is how it works. You modify your httpd.conf file to give one or more users permission to use this feature, specify what the directory name would be, restart apache, and you can access the page via "http://your-domain-here/~username". You must make sure the web server has access to the directory and the files. If not, you'll get a permission denied error page when accessing the file.

To set this up, open up your httpd.conf file and look for "UserDir". Mine is set up something like this:

UserDir disable
UserDir enabled user1 user2 ...

UserDir public_html

As far as I understand, that configuration prevents the web server from implementing user access except for those users explicitly mentioned on the "enabled" line. You'd also need a public accessible directory named public_html in the user's home directory to hold the html code. And directories leading to that dir must have at least execute permissions to allow the web server to access files (not necessarily read access... just execute). The files need to have read access.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Symbolic Links petercool Linux - General 2 08-20-2003 11:15 AM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 11:54 AM
Symbolic links pdstatha Programming 1 04-08-2002 09:50 PM
symbolic links winger Linux - General 5 04-06-2002 05:16 PM
Symbolic links Valerie Linux - Newbie 12 03-31-2002 01:49 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:12 PM.

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