LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-27-2007, 09:22 PM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
FTP Server: Prevent user from getting out of their root directory


Hi guys,

I have a FTP server which I created users' home directories in /home under folders with their respective username.

Even though I have set the proper permission such that they won't be able to access other people's directories, they can still see what's in /home.

Meaning to say after logging in to their account, they will be at their home directory (for UserA, it will be /home/UserA)

But they are able to exit the directory and view /home, though not able to access the other users' directories.

How do I even prevent them from exiting their home directories? If possible.
 
Old 02-27-2007, 10:05 PM   #2
netsupremacy
LQ Newbie
 
Registered: Nov 2006
Distribution: SuSE 10.1, Fedora 4, dyne:bolic 2.3
Posts: 19

Rep: Reputation: 0
specifying which server daemon you're using would be quite helpful...

if youre using vsftpd then in /etc/vsftpd.conf uncomment the line:

chroot_local_user=YES

which i think should do it...
 
Old 02-27-2007, 11:22 PM   #3
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
oops, sorry. Yes I am using vsftp

I uncommented that line... but it seems like i need to specify chroot_user_list because its asking for it...

do I if I want to apply it to all users?

Thanks!
 
Old 02-28-2007, 10:00 PM   #4
netsupremacy
LQ Newbie
 
Registered: Nov 2006
Distribution: SuSE 10.1, Fedora 4, dyne:bolic 2.3
Posts: 19

Rep: Reputation: 0
i think you might of uncommented the wrong line - chroot_list_enable=YES instead of chroot_local_user=YES (ive done that before and got the same error)

if not then you might try creating a blank file for the list:

touch /etc/vsftpd.chroot_list

unless you specified a diferent file in the chroot_list_file=<file> line

you might try looking in the manual page for the config using man vsftpd.conf if that doesnt work...
 
Old 03-02-2007, 01:42 AM   #5
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
hey you are right! haha my bad for the carelessness. Thanks for pointing that out. Now it works fine!

Its not in the .conf, I have to type it out. Too much haste... my bad.

thanks once again people!
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to FTP as user but can FTP as Root acharya_rl Linux - Enterprise 5 09-05-2006 06:57 AM
Changing File Permission in a FTP directory to prevent deleting of files shawnbishop Linux - Software 3 01-10-2006 05:41 AM
Accessing remote Linux server via FTP as root user jbsarma Linux - General 4 11-24-2005 03:33 AM
create ftp user for vsftpd server without home directory cccc Linux - Networking 2 07-30-2005 06:32 AM
Guy got root directory access from my FTP server... how can I fix this? bripage Linux - General 16 10-02-2002 10:12 AM


All times are GMT -5. The time now is 03:11 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