LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 07: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, 07:45 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 12:28 PM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:25 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
Open Source Consulting | Domain Registration