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 08-09-2004, 04:25 AM   #1
allan_y
Member
 
Registered: May 2004
Location: Canberra
Distribution: Redhat 9
Posts: 32

Rep: Reputation: 15
symlink permissions


hi,

i've set up some symlinks in /var/wwww/ so that i can point my browser to some directories in my home directory, however when i do so, i get access denied. Just wondering how do the permissions work? i'm guessing the permssions are that of my directories i'm trying to view, and not permissions of the actual symlink. is that right? if so how can i get around this becuase i can't just chmod the directories and allow everyine to be able to view my files, we have a few users on the box.

thanks
 
Old 08-09-2004, 04:56 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Then make use of group permissions. Make yourself part of the group that owns the files you're trying to view and set up the permissions so that members of the group can see the files but others can't.
 
Old 08-09-2004, 05:05 AM   #3
allan_y
Member
 
Registered: May 2004
Location: Canberra
Distribution: Redhat 9
Posts: 32

Original Poster
Rep: Reputation: 15
this still doesn't let me see the files through a web browser.

my permissions are as follows:
drwx------ where i'm the creator and owner. i can access these files. no other user can. is there a way i can view the files through a web browser?
 
Old 08-09-2004, 10:44 AM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Look in your httpd.conf for these terms: Options FollowSymLinks. You can find info on the Apache website.

Last edited by stickman; 08-09-2004 at 10:53 AM.
 
Old 08-09-2004, 10:47 AM   #5
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by allan_y
this still doesn't let me see the files through a web browser.

my permissions are as follows:
drwx------ where i'm the creator and owner. i can access these files. no other user can. is there a way i can view the files through a web browser?
Are you accessing them with a URL that starts with "http://" or "file:///"? It makes a difference. If your using "http://" then you need to make sure that the user that Apache runs as (ie apache, www, or nobody) has the appropriate perms.
 
Old 08-09-2004, 10:20 PM   #6
allan_y
Member
 
Registered: May 2004
Location: Canberra
Distribution: Redhat 9
Posts: 32

Original Poster
Rep: Reputation: 15
i'm using http:// and i'm working remotely. as far as i know, symlinks have been allowed in httpd.conf.

i think i will just make my directory viewable by everyone and see if it works
 
Old 08-09-2004, 10:40 PM   #7
allan_y
Member
 
Registered: May 2004
Location: Canberra
Distribution: Redhat 9
Posts: 32

Original Poster
Rep: Reputation: 15
how do you find out what user apache is running under?
 
Old 08-10-2004, 12:15 AM   #8
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Your httpd.conf will tell you what user Apache is running as. Usually it's apache or www in most default set ups. Remember, when you are accessing your system via the Web server, the system has no idea that the person behind your user account is trying to access resources - all it knows is that the Web server is trying to access them. If you need to look at your files remotely, doing it over Apache is probably not the best way, although with HTTP authentication you could probably sort of make it work. A better idea might be to install Webmin or Usermon, or simply transfer the files to your remote desktop via SSH.
 
Old 08-10-2004, 08:40 AM   #9
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by allan_y
i'm using http:// and i'm working remotely. as far as i know, symlinks have been allowed in httpd.conf.

i think i will just make my directory viewable by everyone and see if it works
Do you have any upstream directories that (ie /home/username) that are set to 700 or another perm level that denies access to other? If yes, your Apache user (ie www or apache) can't read down to the real directory.

Last edited by stickman; 08-10-2004 at 08:41 AM.
 
  


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
Symlink Fredde87 Linux - General 14 09-30-2005 09:06 PM
where is symlink? guitarfella Slackware 3 12-04-2004 08:34 AM
symlink mikedelo Linux - Software 2 03-28-2004 01:32 PM
symlink evannextel Linux - Newbie 1 09-17-2003 04:54 PM
Symlink Mestax Linux - Newbie 3 09-04-2003 01:07 PM


All times are GMT -5. The time now is 07:59 PM.

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