Vsftpd Not Allowing Local Users To Log On

I am trying to allow local users to us the ftp for my site (really, any user would work, I just thought this would be easiest). I am trying to make it so that I can upload themes, install plugins, etc on a WordPress site hosted on my Ubuntu 14.04 machine. Here is the contents of my vsftpd.conf file from /etc/

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default)
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key


Similar Content



FTP Issue From One Server To Anothe Server

when i try to ftp from server to another server I am getting error below

bash-3.2$ ftp 172.25.27.120
Connected to 172.25.27.120.
220 Service ready for new user.
Name (172.25.27.120:ccnusr): crsftp
331 User name okay, need password for crsftp.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
ftp> cd /tmp
250 Directory changed to /tmp
ftp>
ftp> mput /tmp/tst.air
mput /tmp/tst.air? y
200 Command PORT okay.
550 /tmp/tst.air: Permission denied.
ftp>
ftp>

Please let me know if anyone has faced the simialar issue.

I have checked the vsftpd.conf file and seems everything is fine

anonymous_enable=YES
local_enable=YES
write_enable=YES
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#deny_email_enable=YES
# directory. If chroot_local_user is YES, then this list becomes a list of
#chroot_local_user=YES
#chroot_list_enable=YES
#ls_recurse_enable=YES
listen=YES
#listen_ipv6=YES
userlist_enable=YES
tcp_wrappers=YES

550 Permission Denied Vsftpd

Hi, I'm having trouble configuring my vsftpd version 2.2.2 on Centos 6.6. I successfully log in, but I cannot make any changes (creating files, directories, whatever):
ftp> mkdir t
550 Permission denied.
ftp>

This is how my vsftp.conf looks:
Code:
anonymous_enable=NO
local_enable=YES
local_umask=022
dirmessage_enable=YES
listen=YES
pam_service_name=virtual-ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
userlist_deny=NO
tcp_wrappers=YES
write_enable=YES
guest_enable=YES
guest_username=ftp
local_root=/mnt/storage/ftp

All users are mapped to the ftp user. /mnt/storage/ftp is owned by ftp and there are no permission problems (the mount point is /mnt/storage). I use pam for authentication, which seems to be working fine from what I can tell from the logs and the fact that I can log in, of course.

/mnt/storage is a linux partition and it's mounted like this:
/dev/sdb5 /mnt/storage ext4 defaults 0 0

Which is really unimportant, because I tried to use the root partition also, and I get the same problem.

On some site someone suggested allow_writeable_chroot=YES, but this directive is not identified by vsftpd.

I kind of ran out of ideas. Any suggestions?

Vsftpd - How To Change A Virtual User Password?

Hi, I'm really a newbie when it comes to Linux, so please bear with me.

We have a working FTP using vsftpd with a pam.d database (by the looks of it).

I've found the list of users/password in the /etc/vsftpd/ folder called passwd, but they are all encrypted.

How can I change the password for a single user? I'm sorry I've been looking for over 3 hourw, still don't understand how to do this.

Thank you very much for whomever can help.

Can Not Connect Ftp Server

I have installed vsftp to the server , the status is running now , but when use the command "ftp localhost" , it pops the "421 Service not available." , would advise what is wrong ? thanks

bash-3.2# /etc/rc.d/init.d/vsftpd status
vsftpd (pid 580) is running...
bash-3.2# ps -ef |grep vsftpd
root 580 1 0 15:44 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root 607 467 0 15:45 pts/0 00:00:00 grep vsftpd
bash-3.2# ftp localhost
Connected to localhost (127.0.0.1).
421 Service not available.

Installed Vsftpd But Can Not Use

I have install vsftpd and start it , but when when to try it by "ftp localhost" , but not work , would advise what is wrong ? thanks


#ps -ef |grep ftp
Code:
root     29896     1  0 10:53 ?        00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root     29899 23821  0 10:53 pts/0    00:00:00 grep ftp

# ftp localhost
Code:
Connected to localhost (127.0.0.1).
421 Service not available.

Ftp: Connect: No Route To Host

I have two VM's on a Redhat 7 Base machine and installed Redhat 6 on both machnies. Trying to use FTP. I can ping both each other.
VSFTPD is installed,
firewall is enabled.
vsftpd.conf is also updated for anonymous user login.
I could login using anonymous user.
while uploading file
I am getting a message as ftp: connect: no route to host

Why Vsftp Can Do It, But Openssh Sftp Cannot ? (chroot)

Dear all,

This is long story cut short, with vsftp, if i set this parameters in the vsftp.conf file below

Code:
local_enable=YES
chroot_local_users=YES

I am able to login to the ftp account, see and list my home/user directory, and if i do a cd / or cd .. , i will still be chroot to my /home/user directory.

without, the need to chmod or or chown anything to my /home/user directory

=============================================

With openSSH, internal_sftp, even though I have set the sshd_conf to

Code:
Match user alankoh
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
ChrootDirectory /home/%u

I will need to change owner my /home/user directory to have root becomes it owner.
============================================

Q1) why this difference ? How does vsftp chroot without changing the /home/user folder ownership ?

Q2) i realize that openssh ChrootDirectory parameter causes my default login directory to be set as that of the parameter.
(e.g. if i set to "/whatever/xyz", i will be brought to that /whatever/xyz everytime i login to the sftp instead of my /home/user folder.

Why ? I thought that ChrootDirectory is just a security measure to specify the directory to go to in case the user cd to root (e.g. cd /), else not, i should still go to my /home/user folder everytime i login to sftp.

Regards,
Noob

Fail To Install Vsftpd

I use Redhat 6.3 , when I install run "yum install vsftpd" , it pops the following error, does it mean the library is not support , I have to update the kernel ? thanks

Code:
Loaded plugins: product-id, security
file:///media/localrepos/Server/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/localrepos/Server/repodata/repomd.xml
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                    Arch                       Version                            Repository                    Size
=============================================================================================================================
Installing:
 vsftpd                     x86_64                     2.2.2-11.el6                       RHEL-6.3                     151 k

Transaction Summary
=============================================================================================================================
Install       1 Package(s)

Total download size: 151 k
Installed size: 331 k
Is this ok [y/N]: 

Error Downloading Packages:
  vsftpd-2.2.2-11.el6.x86_64: failu  ../Packages/vsftpd-2.2.2-11.el6.x86_64.rpm from RHEL-6.3: [Errno 256] No more mirrors to try.
Loaded plugins

Problems Setting Up VsFTPd With Virtual Users. Need Assistance.

Running mint 17.1 (64 bit) Cinnamon

I've spent a bunch of time trying to troubleshoot my setup of my ftp. Currently trying to get it to work using the virtual users option. I am following this guide http://ubuntuforums.org/showthread.php?t=518293. I've hit a snag that I can't seem to get around. The libdb3-util is where I'm having trouble. When I input the code "sudo apt-get install libdb3-util" my results are as follows:

Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libdb3-util

I have searched around a little, found someone else that had a similar problem, and was able to use db4.7-util to correct their problem. However, when I attempted this, it was unsuccessful. Is there a newer libdb/db I should be installing? If so, when I install it will it alter any of the code I've used from the guide?

I've been following the guide verbatum from the start of "Virtual users with TLS/SSL/FTPS and a common upload directory - Complicated vsftpd" and have stalled at the point of installing the libdb3-util.

Install Package On Centos 7

I use Centos 7 and have just installed vsftpd to the server , I want to start vsftp service after install , when I tried the command "systemctl |grep vsftp" , it show nothing .

I use previous , all services keep at /etc/rc.d/init.d , what I need to do is /etc/rc.d/init.d/vsftpd start .

Please advise what I need to do for Centos 7 to start vsftpd ?

thanks