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


17

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


11

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

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


6

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

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.


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

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

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


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.


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

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

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

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


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

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

As indicated by netstat, vsftpd is actually running. service restart is enough to start it, you don't need to run vsftpd separately (and as you found out, you can't). If you want to use an inetd daemon instead, there are a number of possibilities in Wheezy: xinetd inetutils-inetd openbsd-inetd


2

session required pam_mkhomedir.so skel=/etc/ftp/ umask=0022 As you can see, pam_mkhomedir.so acts at the session level. This means that it acts after the user has been authenticated (by the auth facility). To do so, it defines the following PAM-specific function : PAM_EXTERN int pam_sm_open_session(pam_handle_t * pamh, int flags, ...


2

Are the users local users or vsftp users ? Try the following: grep local_enable /etc/vsftpd/vsftpd.conf That should be set to YES and the users should log in with local accounts for this to work. If you do not want this or already have this set, please paste your /etc/vsftpd/vsftpd.conf here.


2

Remember to comment out listen=YES in your vsftpd.conf file so that you don't run your vsftpd in standalone mode It fixed the problem in my case. Arturo


2

This is not how I would do this, but answering your question anyway: From man vsftpd.conf: chroot_list_enable If activated, you may provide a list of local users who are placed in a chroot() jail in their home directory upon login. The meaning is slightly different if chroot_local_user is set to YES. In ...



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