Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-29-2011, 02:07 PM
|
#1
|
Member
Registered: Mar 2011
Location: Argentina
Distribution: CentOS 5.8 32 Bits
Posts: 30
Rep:
|
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 i´ve 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!
|
|
|
05-29-2011, 02:33 PM
|
#2
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
|
@ 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.
|
|
|
05-30-2011, 09:06 AM
|
#3
|
Member
Registered: Mar 2011
Location: Argentina
Distribution: CentOS 5.8 32 Bits
Posts: 30
Original Poster
Rep:
|
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.
|
|
|
05-30-2011, 06:15 PM
|
#4
|
Member
Registered: Mar 2011
Location: Argentina
Distribution: CentOS 5.8 32 Bits
Posts: 30
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 10:56 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|