LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 05-07-2009, 08:39 AM   #1
goncalopp
Member
 
Registered: Jun 2008
Posts: 47

Rep: Reputation: Disabled
symbolic links directories access and permissions


is there anyway a user can access (assuming correct permissions) the parent directory of a directory he accesses through a symlink?

... ok, that sounds strange
What I mean is, imagine the following directories:

./dir1 user1 700
./dir1/a user1 777
./dir1/a/b user1 777
./dir2 user2 700

Now, if the superuser creates a symlink to ./dir1/a/b in the dir2 directory, is there any way user2 can access ./dir1/a ?
(assuming he does not somehow know the absolute path)


I'm thinking of using this to let users have their homepages, i.e. create a link from /home/userX/www to var/www/userX (the ftp is chroot-ed).
Is this a bad idea?
 
Old 05-07-2009, 08:45 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Any user can do "ls -l" and see what the path is for any links that are visible to hime/her. I don't know if there's a way to get there with a single command
 
Old 05-07-2009, 01:28 PM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,542

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Quote:
Originally Posted by goncalopp
I'm thinking of using this to let users have their homepages,
Are you using apache? See Per-user web directories

Quote:
Originally Posted by pixellany
Any user can do "ls -l" and see what the path is for any links that are visible to hime/her. I don't know if there's a way to get there with a single command
readlink gives the location in a single command, cd $(dirname $(readlink link)) is short enough that a dedicated command seems redundant...
 
  


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
Directories needing multiple access & permissions JayQ7 Linux - Newbie 3 01-28-2009 09:50 AM
Users' home directories as symbolic links mschutte Linux - Software 4 04-11-2007 03:04 PM
symbolic links and permissions jcai Linux - Newbie 2 06-09-2006 04:37 PM
Symbolic Links, directories, and relative paths (../). Can it be done? jimwillsher Linux - Newbie 1 03-11-2005 06:27 PM
mkisofs & symbolic links to directories Imek Linux - General 1 10-28-2004 07:32 PM


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