Unix Technical Forum

Restricting user to a directory with vsftpd

This is a discussion on Restricting user to a directory with vsftpd within the Linux Operating System forums, part of the Unix Operating Systems category; --> Is it possible to restrict all users (I am not using anonymous) to their directory and those below? In ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 07:08 AM
Todd Cary
 
Posts: n/a
Default Restricting user to a directory with vsftpd

Is it possible to restrict all users (I am not using anonymous) to their
directory and those below? In reading the docs, I am not sure how this
can be done.

Todd

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 07:08 AM
Vwakes
 
Posts: n/a
Default Re: Restricting user to a directory with vsftpd

On Tue, 1 Jul 2003 Todd Cary wrote:

>Is it possible to restrict all users (I am not using anonymous) to their
>directory and those below? In reading the docs, I am not sure how this
>can be done.


Yes. You can use the chroot options.

chroot_local_user=yes [for all local users]

or

chroot_list_enable=yes
chroot_list_file=/etc/vsftpd.chroot_list

Check 'man vsftpd.conf' for more info.

Gl
V.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-17-2008, 07:08 AM
Todd Cary
 
Posts: n/a
Default Re: Restricting user to a directory with vsftpd

Vwakes wrote:
> On Tue, 1 Jul 2003 Todd Cary wrote:
>
> >Is it possible to restrict all users (I am not using anonymous) to their
> >directory and those below? In reading the docs, I am not sure how this
> >can be done.

>
> Yes. You can use the chroot options.
>
> chroot_local_user=yes [for all local users]
>
> or
>
> chroot_list_enable=yes
> chroot_list_file=/etc/vsftpd.chroot_list
>
> Check 'man vsftpd.conf' for more info.
>
> Gl
> V.


This is my conf file, yet I can see all of the directories:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

Any suggestions?

Todd

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-17-2008, 07:08 AM
Vwakes
 
Posts: n/a
Default Re: Restricting user to a directory with vsftpd

On Wed, 2 Jul 2003 Todd Cary wrote:

>Vwakes wrote:
>> On Tue, 1 Jul 2003 Todd Cary wrote:
>>
>> >Is it possible to restrict all users (I am not using anonymous) to
>> >their directory and those below? In reading the docs, I am not
>> >sure how this can be done.

>>
>> Yes. You can use the chroot options.
>>
>> chroot_local_user=yes [for all local users]
>>
>> or
>>
>> chroot_list_enable=yes
>> chroot_list_file=/etc/vsftpd.chroot_list
>>
>> Check 'man vsftpd.conf' for more info.

>
>This is my conf file, yet I can see all of the directories:


Are you sure? Coz, I tried with the exact same configuration and it
works for me. I am using version 1.1.3 tho. As soon as you ftp yourself
and typing 'pwd' what do you see? You should see something like '/', if
you see '/home/userx' then it's not chrooted. Are you using the RH rpm
for vsftpd? If so, it uses '/etc/vsftpd/vsftpd.conf' file instead of
'/etc/vsftpd.conf'.

>anonymous_enable=NO
>local_enable=YES
>write_enable=YES
>local_umask=022
>dirmessage_enable=YES
>xferlog_enable=YES
>connect_from_port_20=YES
>xferlog_std_format=YES
>chroot_local_user=YES
>pam_service_name=vsftpd
>userlist_enable=YES


>tcp_wrappers=YES


You don't need the above option if you are running from xinetd. Check
the manpage.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-17-2008, 07:08 AM
Todd Cary
 
Posts: n/a
Default Re: Restricting user to a directory with vsftpd

Vwakes wrote:
> On Wed, 2 Jul 2003 Todd Cary wrote:
>
> >Vwakes wrote:
> >> On Tue, 1 Jul 2003 Todd Cary wrote:
> >>
> >> >Is it possible to restrict all users (I am not using anonymous) to
> >> >their directory and those below? In reading the docs, I am not
> >> >sure how this can be done.
> >>
> >> Yes. You can use the chroot options.
> >>
> >> chroot_local_user=yes [for all local users]
> >>
> >> or
> >>
> >> chroot_list_enable=yes
> >> chroot_list_file=/etc/vsftpd.chroot_list
> >>
> >> Check 'man vsftpd.conf' for more info.

> >
> >This is my conf file, yet I can see all of the directories:

>
> Are you sure? Coz, I tried with the exact same configuration and it
> works for me. I am using version 1.1.3 tho. As soon as you ftp yourself
> and typing 'pwd' what do you see? You should see something like '/', if
> you see '/home/userx' then it's not chrooted. Are you using the RH rpm
> for vsftpd? If so, it uses '/etc/vsftpd/vsftpd.conf' file instead of
> '/etc/vsftpd.conf'.
>
> >anonymous_enable=NO
> >local_enable=YES
> >write_enable=YES
> >local_umask=022
> >dirmessage_enable=YES
> >xferlog_enable=YES
> >connect_from_port_20=YES
> >xferlog_std_format=YES
> >chroot_local_user=YES
> >pam_service_name=vsftpd
> >userlist_enable=YES

>
> >tcp_wrappers=YES

>
> You don't need the above option if you are running from xinetd. Check
> the manpage.


My mistake!! I used the incorrect vsftpd.conf!! My system is the RH 9
with the installed vsftpd and I initially used /etc/vsftpd/vsftpd.conf.
It needed to be /etc/vsftpd.conf.

Thank you for reminding me to check that out.

Todd

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-17-2008, 07:08 AM
Vwakes
 
Posts: n/a
Default Re: Restricting user to a directory with vsftpd

On Wed, 2 Jul 2003 Todd Cary wrote:

>Vwakes wrote:
>>
>> Are you sure? Coz, I tried with the exact same configuration and it
>> works for me. I am using version 1.1.3 tho. As soon as you ftp
>> yourself and typing 'pwd' what do you see? You should see something
>> like '/', if you see '/home/userx' then it's not chrooted. Are you
>> using the RH rpm for vsftpd? If so, it uses '/etc/vsftpd/vsftpd.conf'
>> file instead of '/etc/vsftpd.conf'. [....]

>
>My mistake!! I used the incorrect vsftpd.conf!! My system is the RH 9
>with the installed vsftpd and I initially used /etc/vsftpd/vsftpd.conf.
> It needed to be /etc/vsftpd.conf.


It's not your mistake, its RH's. I thought VsFtpd that came with RH 9
used /etc/vsftpd/vsftpd.conf. If it's not then it's a bug.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-17-2008, 07:09 AM
Todd Cary
 
Posts: n/a
Default Re: Restricting user to a directory with vsftpd

Vwakes wrote:
> On Wed, 2 Jul 2003 Todd Cary wrote:
>
> >Vwakes wrote:
> >> On Tue, 1 Jul 2003 Todd Cary wrote:
> >>
> >> >Is it possible to restrict all users (I am not using anonymous) to
> >> >their directory and those below? In reading the docs, I am not
> >> >sure how this can be done.
> >>
> >> Yes. You can use the chroot options.
> >>
> >> chroot_local_user=yes [for all local users]
> >>
> >> or
> >>
> >> chroot_list_enable=yes
> >> chroot_list_file=/etc/vsftpd.chroot_list
> >>
> >> Check 'man vsftpd.conf' for more info.

> >
> >This is my conf file, yet I can see all of the directories:

>
> Are you sure? Coz, I tried with the exact same configuration and it
> works for me. I am using version 1.1.3 tho. As soon as you ftp yourself
> and typing 'pwd' what do you see? You should see something like '/', if
> you see '/home/userx' then it's not chrooted. Are you using the RH rpm
> for vsftpd? If so, it uses '/etc/vsftpd/vsftpd.conf' file instead of
> '/etc/vsftpd.conf'.
>
> >anonymous_enable=NO
> >local_enable=YES
> >write_enable=YES
> >local_umask=022
> >dirmessage_enable=YES
> >xferlog_enable=YES
> >connect_from_port_20=YES
> >xferlog_std_format=YES
> >chroot_local_user=YES
> >pam_service_name=vsftpd
> >userlist_enable=YES

>
> >tcp_wrappers=YES

>
> You don't need the above option if you are running from xinetd. Check
> the manpage.


Many thanks! It is hard enough getting use to the Linux
environment...alsomt like I have never used a computer before :-) !!

I need to recompile PHP with the Interbase extensions (and then
recompile Apache). Conceptually I understand what needs to be done
*BUT* the nitty-gritty is quite foreign.

The installed version of PHP has all of the extensions I need except
Interbase (http://209.204.172.137:8080/testphp.php ). Is it possible to
just *add* Interbase.

If so, is there docs on how to do that and then recompile Apache?

Todd

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com