LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-29-2006, 03:22 PM   #1
LSOsheriff
LQ Newbie
 
Registered: Jun 2005
Location: Lincoln NE
Distribution: Kubuntu
Posts: 10

Rep: Reputation: 0
Symbolic Link to solve my out-of-space problem?


Hi all:

I have spent the past three work days trying to determine how to solve an out-of-space problem. And -- in advance -- I realize that my solution isn't the correct way. But I need for this to work in the short term, while I otherwise fix the problem correctly. So please bear with me.

I am using Mandrake 10.1 / Apache / PHP

I am low on space on /var/www/html/lsopix/ whereas I have oodles of space on /home/garyjuilfs/lsopix/ which is where I have copied all the (photo) data.

My PHP code looks for the photos in the first directory. I would like to be able to set a symbolic link that says "if a browser is looking for the /var/www/html/lsopix/ directory, please point it to /home/garyjuilfs/lsopix/ instead.

Would that work?

Could someone tell me how to make that 'alias' or 'symbolic link' or whatever work.

Many thanks
 
Old 08-30-2006, 01:20 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
First, you'd need to do "ln -s /home/garyjuilfs/lsopix /var/www/html/lsopix". Make sure /var/www/html/lsopix does not exist before doing this. You might need to set "Options +FollowSymlinks" in your httpd.conf.
 
Old 08-30-2006, 10:08 AM   #3
LSOsheriff
LQ Newbie
 
Registered: Jun 2005
Location: Lincoln NE
Distribution: Kubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
Symbolic Link

Matir -- thanks for the prompt reply; much appreciated.

The creation of the symbolic link seems to have worked, at least in part. With my browser (on the development box)I can open the location of /var/www/html/lsopix/ and see yet another 'folder' entitled /var/www/html/lsopix/lsopix/ -- AND all the photos show up there, without impacting at all on the amount of space left in the itty bitty original directory. This is good.

O.T.O.H., I haven't figured out how to get the code to "see" the photos in the linked folder. I get a "You don't have permission to access /lsopix/lsopix/672IMG_1124.JPG on this server"

And yet, the permissions show rwx for all and the group shows as "apache" which is what I would expect.

What might I be missing here?

Apparently, the pictures are being seen, except for the permissions thing, right?

Thanks again
 
Old 08-30-2006, 10:53 AM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,114

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by LSOsheriff
...and see yet another 'folder' entitled /var/www/html/lsopix/lsopix/
You didn't get the symlink quite right if you're seeing the redundant "lsopix/lsopix" directory. As Matir said, "Make sure /var/www/html/lsopix does not exist before doing this." My guess is that the directory DID exist, and you therefore created your symlink IN that existing directory, not REPLACING it as Matir suggested.

That may or may not be a problem for you, the webserver will work just fine with it if your users are willing to type in the redundant directory name. But this is not the direct source of your permissions problem.
Quote:
O.T.O.H., I haven't figured out how to get the code to "see" the photos in the linked folder. I get a "You don't have permission to access /lsopix/lsopix/672IMG_1124.JPG on this server"
Did you add "Options +FollowSymlinks" to your httpd.conf file as Matir said? My guess is not, or maybe you added it in the wrong place in the file.

Look at Apache's error_log for more details of why you can't access the JPG's. I'll bet it's complaining that it can't follow symlinks.
 
Old 08-30-2006, 11:13 AM   #5
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
Hey LSOsheriff,

You wrote:
Quote:
O.T.O.H., I haven't figured out how to get the code to "see" the photos in the linked folder. I get a "You don't have permission to access /lsopix/lsopix/672IMG_1124.JPG on this server"
It seems as if that the file access permissions are fine -- at the OS level. I'm guessing that some application -- most likely Apache -- is denying users access to the data (photos) on /home/garyjuilfs/lsopix .

I've never used Apache, so this is a hunch, but I'm guessing that Apache's user permissions are set to allow access to /var/www/html/lsopix/. Perhaps those user access permission settings do not automatically follow with the synlink, and they need to be set for /home/garyjuilfs/lsopix as well.
 
  


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
Problem related symbolic link raj_sony2001 Linux - General 1 06-01-2006 06:17 AM
Unlink the symbolic link problem anh Linux - Software 3 03-17-2006 01:47 PM
Java (JRE 1.5.0_02) - Symbolic Link Problem pacranch Amigo 1 04-14-2005 06:37 AM
symbolic link problem ranger225 Linux - Newbie 13 09-21-2004 03:47 PM
Redhat 8.0 Symbolic Link Problem & Maillog Problem. borisys Red Hat 1 07-27-2004 10:35 AM


All times are GMT -5. The time now is 10:32 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