LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-29-2011, 02:07 PM   #1
oscargim
LQ Newbie
 
Registered: Mar 2011
Location: Argentina
Distribution: CentOS 5.8 32 Bits
Posts: 27

Rep: Reputation: 0
Disable Symbolic Link ln -s


Hi, i made a symbolic link with this

ln -s user

so the user can view all the folders from ftp no just the home folder

but now i see that all the ftp users can see all the folders so they can view everything not just they home folder

If someone knows how to apply that just for one user, or the way to disable the link "ln -s" that ive made.

I prefer to no one able to see all the folders but if you know how to ddo it for just one user will be good.

i have a dedicated server on centos 5

Thanks!
 
Old 05-29-2011, 02:33 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,692

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
@ Reply

Hi there,

Well symbolic link is just like a pointer. Suppose you have a file name testing under /home/ then can create a symbolic link that will point to this file using the following command: ln -s /home/testing /etc/test_file

Here you are creating a file a symbolic link in which /etc/test_file will be linked (point) to original file located under /home/testing. So basically if you remove the file /etc/test_file then symbolic link is gone. However, if you will delete the original file i.e. /home/testing then it will break the symbolic link, as the file /etc/test_file to point is no longer exist.

So basically you can remove the symbolic link by removing the linked file, remember not the original file.

Also as I can understand what you are looking for is creating a symbolic link that will point to users home directory. Well if you create a generic symbolic link in /var/vsftpd/pub directory to point to /home then users will be able to see all the contents of /home. However, they will not be able to browse.

Well then you can add up a command in /etc/profile so that when they login it will automatically create a symbolic link directly mapped to their home directory.

Last edited by T3RM1NVT0R; 05-29-2011 at 02:41 PM.
 
Old 05-30-2011, 09:06 AM   #3
oscargim
LQ Newbie
 
Registered: Mar 2011
Location: Argentina
Distribution: CentOS 5.8 32 Bits
Posts: 27

Original Poster
Rep: Reputation: 0
Thanks for the answer, i used the ln -s command as root on the home directory of one user, ex. in: /home/user i run: ln -s user

I found in /home/user a new archive called user marked in red (i guess thats the file created when i made the link) i delete it but still ftp users have access to all the files on the server


And everyone can see all the directories, i just want it to be like it was, each user just can see its home directory.

I have installed webmin, if there is a way to do it from there.

Thanks again.

Last edited by oscargim; 05-30-2011 at 09:31 AM.
 
Old 05-30-2011, 06:15 PM   #4
oscargim
LQ Newbie
 
Registered: Mar 2011
Location: Argentina
Distribution: CentOS 5.8 32 Bits
Posts: 27

Original Poster
Rep: Reputation: 0
I removed the symbolic link but all the users still can see all the files on the server via ftp i solve it addin this to vsftpd.conf

Above to directives will enable logging of all FTP transactions. Lock down users to their home directories:

chroot_local_user=YES


Now all users are locked to they home directory


Hope it helps someone!
 
  


Reply

Tags
access, ftp, ln, user


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
symbolic link not allowed or link target not accessible paullaubscher Linux - Newbie 4 03-10-2010 06:47 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
Not a symbolic link ?? attockonian Linux - Newbie 4 06-30-2006 08:09 PM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
Symbolic link bwaynej2002 Linux - General 8 08-25-2003 10:06 PM


All times are GMT -5. The time now is 02:25 AM.

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