LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-22-2016, 01:01 PM   #1
elsheepo
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Slackware
Posts: 90

Rep: Reputation: 20
Restricting a user to their home directory in vsftpd


So I have vsftpd installed.
Code:
root@D620:~# ls /var/log/packages/*vsftp*
/var/log/packages/vsftpd-3.0.3-i586-3
/etc/vsftpd.conf

https://jpst.it/PGeK

/etc/vsftpd.user_list
Code:
ftbeatzz
/etc/vsftpd.chroot_list
Code:
ftbeatzz
I use ufw for my internal firewall, all standard ftp ports are open.

iptables -L

https://jpst.it/PGfS

I have a user, 'ftbeatzz' whom I want reserved specifically for ftp access.

entry for 'ftbeatzz' in /etc/passwd
Code:
ftbeatzz:x:1003:100:,,,:/home/ftp/:/bin/bash
The Goal: I want the user 'ftbeatzz' to be restricted to it's $HOME directory.

Currently when I login to the ftp service, it lets 'ftbeatzz' loose in the / directory, able to read/write to all files.

Last edited by elsheepo; 11-22-2016 at 02:06 PM.
 
Old 11-22-2016, 01:34 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
You need to set it up with

Code:
  chroot_local_user=YES
 
Old 11-22-2016, 01:55 PM   #3
elsheepo
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Slackware
Posts: 90

Original Poster
Rep: Reputation: 20
I added the option to the end of /etc/vsftpd.conf, I also commented out the lines
Code:
#chroot_local_user=NO
#chroot_list_enable=NO
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
and I'm getting the same error. See attachment. Also, here is the current vsftpd.conf

/etc/vsftpd.conf

https://jpst.it/PGoj
Attached Thumbnails
Click image for larger version

Name:	FTP_connection_error.jpg
Views:	41
Size:	9.8 KB
ID:	23602  

Last edited by elsheepo; 11-22-2016 at 01:57 PM.
 
  


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
a parameter in vsftpd conf file without which vsftpd server will not work James0806 Linux - Newbie 1 09-24-2014 12:37 PM
[VSFTPD] 500 OOPS: vsftpd: refusing to run with writable root inside chroot() srijur Linux - Server 1 03-31-2014 04:10 AM
Starting vsftpd for vsftpd: 500 OOPS: SSL: cannot load RSA certificate MisterTickle Linux - Server 2 02-11-2011 07:41 PM
VSFTPD woes musa Linux - Server 3 12-24-2009 10:13 AM
vsftpd.conf/chroot/vsftpd.chroot_list issue Jerman Linux - Security 2 06-01-2007 07:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:36 PM.

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