LinuxQuestions.org
Register a domain and help support LQ
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 05-15-2013, 11:33 AM   #1
javier_ns
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Rep: Reputation: Disabled
Question How to create a shorcut to a folder and its subfolders..?


Hi, I'm a newbie in linux, but reading a lot and with trial and error, I was able to setup a CentOS server..
But there is something that I havent been able to do... and I'm posting here so maybe you guys can help me, and give me any direction about these..
I have a folder with images, css, etc.. that is common for all the pages I'm seting up, but I dont want to make a new copy of the folder each time a new page comes up, but instead, just link them to the main folders, so I Though about create shorcuts to the folders... (Image Attached)

http://i256.photobucket.com/albums/h...pse77db082.jpg

And I use:
ln -s /var/www/html/carpetas_html/index.php /var/www/html/prueba1/sistema/html/index.php

And it was ok, but when I tried the same with the folders, it seems that it doesn't find the content inside the folder...
Is there a way of doing these, or maybe I shoud try any other method...?
Thanks a lot in advance..!!
 
Old 05-15-2013, 12:50 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 1,990

Rep: Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512
It may depend on the options specified for Apache. If you have "followsymlinks" it should work as long as the apache UID/GID has access to the directory and files within that directory.

It also may depend on what the link is named (as apache does do interpretation on that) and the target directory. What is the symbolic link that doesn't work?

HOWEVER, on some systems (RH mostly), access to files and directories is also controlled by SELinux, and files/directories to be accessed by Apache must also have the correct security label.
 
Old 05-15-2013, 02:15 PM   #3
javier_ns
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi, Thanks a lot for your quick answer... the name of the folders are exactly the same as in the image attached before... this is a screenshot of how it look after I made the shorcuts.. http://i256.photobucket.com/albums/h...psbe9b25c6.jpg
And I'm not quite sure wich one of them its not woking, because the index.php, is redirecting, but after that I got an HTTP 500 (Internal Server Error), and since I haven't create any virtualhost yet, I havent use the followsymlinks option... one more thing, I am working from webmin, and in the screenshot, it seems that the folders css and images got no icon at all.. its that normal, some webmin issue, or maybe something to lookup..?

Thanks again for your help..!!
 
Old 05-15-2013, 05:51 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 1,990

Rep: Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512
You have to use the followsymlinks option. It isn't a default.

I don't use webmin as I find it hides too much information necessary. OK for casual stuff.

On my system I have the following for the web server root document:
Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
If that "Options FollowSymLinks" isn't there, then it will not use symbolic links, and it will give you an error in the apache logs.

Last edited by jpollard; 05-15-2013 at 05:57 PM.
 
  


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
Scripts to list folder contents and copy images from folder and subfolders brunces Linux - Newbie 6 11-03-2011 01:23 PM
Determine if folder has subfolders with out overhead from find or ls davstin2002 Programming 1 12-20-2006 05:49 PM
How can I create KDE/Gnome menu shorcut via perl script? mf1234 Programming 1 08-16-2005 05:46 PM
How to make JHEAD work on all subfolders within a folder SupaDucta Linux - Newbie 0 11-26-2004 06:02 PM
changeing permissions for a folder + subfolders and files ? YBA^[x] Slackware 7 08-06-2004 04:07 AM


All times are GMT -5. The time now is 02:28 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration