Hot answers tagged

34

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 ...


19

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 ...


18

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 ...


12

Could you try this chown -R ftpusername /var/www/html


12

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 ...


10

There are two likely reasons that this could happen -- you do not have write and execute permissions on the directories leading to the directory you are trying to upload to, or vsftpd is configured not to allow you to upload. In the former case, use chmod and chown as appropriate to make sure that your user has these permissions on every intermediate ...


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 = ...


7

The command ftp put /path/to/local_file doesn't work with vsftpd. Try the following: ftp put /path/to/local_file remote_file_name You may choose any name you wish for the remote_file_name, but you must specify one.


7

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


7

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


6

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.


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 ...


4

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 ...


4

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 ...


4

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 ...


4

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.


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

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


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

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

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

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

I had a similar problem and discovered that it's caused by an environment variable. When you use su, it leaves the UPSTART_SESSION environment variable set (from the original user's environment), which breaks things. Using sudo or su - unsets it, so any of these will work: $ sudo service vsftpd restart $ sudo su # service vsftpd restart $ su - # ...


3

First of all I'd create a symlink between /var/www/ and my home what this does is, when you land into /home/usr you can go to /home/usr/www and it will redirect you to /var/www for instance. cd /home/usr sudo ln -s /var/www www perform a ls -lrt on /var/www ls -lrt /var/www/ now make sure your usr is part of group that owns www. this tells you who ...


3

That line from netstat means you already have an ftp server running. You could either stop that one or have vsftpd run on another port. Most likely you want the former. service proftpd stop service vsftpd start should work (depending on your OS) or /etc/init.d/proftpd stop /etc/init.d/vsftpd start or systemctl stop proftpd systemctl start vsftpd ...


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

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

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

Note: This solution works well for me and is easy to set-up. Assuming you use vsFTPd. I jailed all users to their home directory and shared a folder called "Shared" between all of them. Jail users to their home directly $ sudo vi /etc/vsftpd/vsftpd.conf Make Sure that this is the following configuration: anonymous_enable=NO local_enable=YES ...


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 ...



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