Hot answers tagged

30

To achieve this need following things : Method 1# By changing User's Home directory Make sure following line exists chroot_local_user=YES Set User HOME Directory to /var/www/ , if you want to change for existing user then you can use : usermod --home /var/www/ username then set required permission on /var/www/ Method 2# If you don't want to ...


18

Your ftp server needs a channel to transfer data. Port 21 is used to establish the connection. So to make data transfer possible you'd need to enable port 20 as well. See the following configuraton First load the following module to make sure passive ftp connections are not rejected modprobe ip_conntrack_ftp Allow FTP connections on port 21 incoming and ...


16

It's quite simple. You have to add the following option on the vsftpd.conf file chroot_local_user=YES The documentation inside the configuration file is self-explanatory: # 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(). This ...


10

FTP is an ancient protocol. It relies on two TCP connections: a control connection over which commands are exchanged, and data connections for the content of files and also for the output of commands such as ls. What's happening here is that the control connection is established, but the data connections aren't going through. By default (active mode), data ...


8

SFTP is not FTP. It's the sftp subsystem of ssh, it's handled by the sshd daemon, not vsftpd or any FTP server. It's on the ssh TCP port (22), not the FTP port 21 (well FTP commands are on 21 while data connections are on arbitrary ports, and those multiple connections in FTP are one of the many reasons why SFTP is so much better than FTP). ss -lp sport = ...


6

There is a post here that describes the problem. The new kernel module seccomp is used automatically by vsftpd since version 3.0.0. vsftpd is a bit buggy when using seccomp. Add this line to the end of /etc/vsftpd.conf seccomp_sandbox=NO and restart the Server: sudo service vsftpd restart


5

In addition to Stephane's answer I'd like to point out that there is FTPS, too. FTPS is the classic FTP protocol over an SSL-secured connection. If you meant this you'd have to adjust your question of course, but it would be a completely different question then. There are two variations of FTPS, one were the control channel is secured (credentials etc) and ...


5

A restart job has to kill an old instance first. What is happening here is that there isn't an old copy to kill. I advise you to try this command instead: /etc/init.d/vsftpd restart


4

Run this one command, no need to restart any service & server: # setenforce 0 To check SELinux status : # getenforce or edit the file /etc/sysconfig/selinux to include SELINUX=disabled Doing so will require a reboot.


4

Working from the vsftpd version 2.2.2, there are two options for keeping users in a chroot jail: chroot_list_enable Just add users to the chroot list e.g. (/etc/vsftpd/chroot_list) that you want placing in a chroot jail. chroot_local_user This will place all local users in a chroot jail, however, if this is set then the chroot_list becomes a list of ...


3

You have 2 options: chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd/nonchroot.list Where file /etc/vsftpd/nonchroot.list should contail the users you don’t want to chroot. OR chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot.list Where the file /etc/vsftpd/chroot.list should contain the users you want to be chrooted ...


3

When using rsyslogd you can create a filter rule that matches some vsftp log messages of interest and emails them to you. Rsyslog has an email output module. Other syslog daemons may provide similar features. Perhaps you also need to adjust some vsftpd options to get all events of interest reported. In general, the question is, if you really want to get ...


3

vsftpd is a FTP server implementing the FTP protocol. Some extensions for encryption are available for FTP, but they are completely different from SFTP which is a subsystem of SSH. If you want to use sftp, you need to configure a ssh server and enable the sftp subsystem (see the sshd_config man page for details). It's also possible to configure sftp with ...


3

Interestingly enough, my vsftpd writes the versino string to stdin. So you probably need to do a rather unusual redirection of stdin to stdout: i=`/usr/sbin/vsftpd -version 0>&1` How to find this out: run it in strace (you'll need to do it as root) and check for the string. In my case the log ends like this: $ strace /usr/sbin/vsftpd -version ... ...


3

That group should have rwx permissions on that folder. If not run chmod 775 <directory>


3

The simple solution is to switch Filezilla to use passive mode when connecting to that FTP server. When you connect to FTP you use port 21 which is known as the control channel. This is the connection used to send commands and receive notifications on the results of the commands issued. Note that for file listings (the output to LIST), file transfer ...


3

Adding NEW fixed it, I believe. Now, my iptables file look like this.. # Generated by iptables-save v1.3.5 on Thu Oct 3 22:25:54 2013 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [824:72492] -A INPUT -p tcp -m tcp --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 20 -m conntrack --ctstate ...


3

You could try the following in vsftp.conf:- anon_other_write_enable=YES The man page says:- If set to YES, anonymous users will be permitted to perform write operations other than upload and create directory, such as deletion and renaming. This is generally not recommended but included for completeness.


2

It sounds likely that the vsftpd that is installed has not been as part of a package. You can identify which process is handling ftp connections with (as root): ss -pl sport = :ftp If it says inetd or xinetd, you'd need to have a look at their configuration to see what command is actually run for those. If it doesn't, then given the process' pid ($pid), ...


2

You have few options: Set local_umask in vsftpd.conf to 022 instead of default 077 Set chmod_enable to YES and do CHMOD via ftp client (if it does not do so already) By the way, better to use scp, because it does not transmits your credentials in plaintext, and you can configure public key authentication, so you will not have to enter password each time, ...


2

Although disabling SELinux by SELINUX=disabled will solve the problem this would not be advisable. You can enable ftp user to access his home directory by configuring SELinux boolean value ftp_home_dir by running the following command: setsebool -P ftp_home_dir=1


2

Please make sure the following setting is configured in your /etc/vsftpd.conf file anon_root=/example/directory/ # Directory to be used for an anonymous login if you are trying to create a soft link to redirect to certain directory then note that a soft links cannot resolve unless where they link to is inside the chroot area.


2

After you've changed your config to include chroot_local_user=YES You could change the user's shell to /usr/sbin/nologin so that if the password leaks you will have mitigated some risk (set the home directory too) usermod -d /var/www/my.domain.example -s /usr/sbin/nologin exampleuser -d, --home HOME_DIR The user’s new login ...


2

To install using YUM Your RHEL should Register with RHN or You can setup Local Yum repository for the same. If you are installing from the CD-ROM: mount the CD-ROM: mount /dev/cdrom /mnt/ change to the RPMS directory in the CD-ROM: cd /mnt/RedHat/RPMS if you know the name of the package type ls packagename* (e.g. ls *vsftp*) to find the full package ...


2

Full Complete solution for "ftp 500 Illegal PORT command". Click the following link: http://www.ucodice.com/articles/ftp-500-illegal-port-command/. Excerpt Trying to connect the ftp server & getting 500 Illegal port command. This issue may occur when ftp program is not configured for Passive mode. You may get error snippet such as: COMMAND:> ...


2

you can try playing with : cmds_allowed This options specifies a comma separated list of allowed FTP commands (post login. USER, PASS and QUIT and others are always allowed pre-login). Other commands are rejected. This is a powerful method of really locking down an FTP server. Example: cmds_allowed=PASV,RETR,QUIT Default: (none) cmds_denied ...


2

Try port 21. That is the standard-ftp-port, not port 20, 20 is default for ftp-data.


2

I think the issue is that you used useradd not adduser sudo adduser username Please check this http://ubuntuforums.org/showthread.php?t=2240340


2

Try with sudo, it seems a bug or that you don't have permissions over service with root. $ sudo service vsftpd status should work, indeed is working now for me in front of my eyes.


2

This tutorial would seem to be what you're looking for, titled: Setup Virtual Users and Directories in VSFTPD. excerpt In /etc/vsftpd.conf. listen=YES anonymous_enable=NO local_enable=YES virtual_use_local_privs=YES write_enable=YES connect_from_port_20=YES secure_chroot_dir=/var/run/vsftpd pam_service_name=vsftpd guest_enable=YES user_sub_token=$USER ...



Only top voted, non community-wiki answers of a minimum length are eligible