LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   vsftpd is pissin me off - any help plz (https://www.linuxquestions.org/questions/linux-software-2/vsftpd-is-pissin-me-off-any-help-plz-82535/)

cyph3r7 08-16-2003 10:04 AM

vsftpd is pissin me off - any help plz
 
:mad:

Ok I am starting to get pissed off. I am trying to setup vsftpd. I have setup ftp servers in the past quite easily yet the syntax of this one is driving me crazy. I have read tons of docs and it ain't helpin so please dont post links. Sorry if I sound frustrated, it's because I AM.

I want to jail a single user to it's home dir. the user is called ftpuser and the home dir is /ftp.

Here is my vsftpd.conf file:

ftp_username=ftpuser
chroot_local_user=YES
local_enable=YES
write_enable=YES
local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
nopriv_user=nobody
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#ftpd_banner=Welcome to blah FTP service.
deny_email_enable=YES
banned_email_file=/etc/vsftpd.banned_emails
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
anonymous_enable=NO


What the heck am I doing wrong?

markus1982 08-16-2003 10:16 AM

Well I would not like to correct your config. I think you should go for VIRTUAL users anyway. In this case I can provide you with some help (users are chrooted to the directory specified in the user configurations file). The main config file:
Code:

# ====================================================================
# base settings
# --------------------------------------------------------------------
chroot_local_user=YES
force_dot_files=YES
ftpd_banner=My FTP server. All actions are being logged!
guest_enable=YES
guest_username=ftp
hide_ids=YES
listen=YES
listen_address=XXX.XXX.XXX.XXX
local_enable=YES
log_ftp_protocol=YES
max_clients=50
max_per_ip=5
nopriv_user=ftp
pasv_address=XXX.XXX.XXX.XXX
pasv_enable=YES
pasv_min_port=64000
pasv_max_port=65535
session_support=NO
use_localtime=YES
user_config_dir=/etc/vsftpd/dyn/users
userlist_deny=YES
userlist_enable=YES
userlist_file=/etc/vsftpd/denied_users
virtual_use_local_privs=YES
xferlog_enable=YES
# ====================================================================



# ====================================================================
# ftp settings
# --------------------------------------------------------------------
async_abor_enable=YES
chmod_enable=NO
cmds_allowed=BINARY,CWD,DELE,LIST,MKD,PASS,PASV,PORT,PWD,QUIT,REST,RETR,RMD,STOR,SYST,TYPE
connect_from_port_20=YES
dirlist_enable=NO
download_enable=NO
local_umask=0027
pasv_enable=YES
port_enable=YES
write_enable=NO
# ====================================================================

And the /etc/vsftpd/denied_users (every user from /etc/passwd):
Code:

backup
bin
daemon
ftp
lp
mail
man
markus
news
nobody
operator
postfix
root
sshd
sys
uucp
www-data

The users configuration file looks like (filename = username):
Code:

chmod_enable=YES
dirlist_enable=YES
download_enable=YES
local_root=/var/www/www.example.net
write_enable=YES

And the /etc/pam.d/ftp looks like that:
Code:

auth    required /lib/security/pam_userdb.so db=/etc/vsftpd/dyn/accounts
account required /lib/security/pam_userdb.so db=/etc/vsftpd/dyn/accounts

Check the manual on more information. If your require more help just post a note ... oh I created vsftpd from source and then created a package. Using vsftpd 1.2.0

jax79sg 08-25-2003 07:42 AM

Hi, havnig a lot of questions with vsftpd.
where should i place this (filename = username): config file?

Coldmiser 10-20-2003 09:45 AM

In the above example in his vsftpd.conf file he has the line:

user_config_dir=/etc/vsftpd/dyn/users

that means the file should go in that directory.

So if your user is "Coldmiser" then you would copy your vsftpd.conf file to /etc/vsftpd/dyn/users/coldmiser


All times are GMT -5. The time now is 11:03 PM.