Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

2 votes
1 answers
3361 views
vsftpd: virtual user not able to upload file or create directory
I created 2 virtual users for ftp (vsftpd): bholu1 and bholu2 I wanted bholu1 to have write access, access to make directory and upload permission. For that I have set up the user bholu1 as below but still he isn't able to upload file or create a directory. ( I have followed [this link][1] to achiev...
I created 2 virtual users for ftp (vsftpd): bholu1 and bholu2 I wanted bholu1 to have write access, access to make directory and upload permission. For that I have set up the user bholu1 as below but still he isn't able to upload file or create a directory. ( I have followed this link to achieve this) See below: I have set per-user configurability for both user :bholu1 and bholu3 ravbholua@ravi:/etc/vsftpd_user_conf$ pwd /etc/vsftpd_user_conf ravbholua@ravi:/etc/vsftpd_user_conf$ cat bholu1 anon_world_readable_only=NO write_enable=YES anon_upload_enable=YES ravbholua@ravi:/etc/vsftpd_user_conf$ cat bholu3 anon_world_readable_only=NO ravbholua@ravi:/etc/vsftpd_user_conf$ Both are able to read the login directory. But as per the configuration for bholu1, he should be able to upload as well as create a new directory but he isn't able to do so. Please see below the conf. file: ravbholua@ravi:/etc$ cat vsftpd.conf pam_service_name=/etc/pam.d/vsftpd.virtual user_config_dir=/etc/vsftpd_user_conf anonymous_enable=NO local_enable=YES #write_enable=NO #anon_upload_enable=NO #anon_mkdir_write_enable=NO #anon_other_write_enable=NO anon_world_readable_only=YES chroot_local_user=YES guest_enable=YES guest_username=virtual listen=YES listen_port=10021 pasv_min_port=30000 pasv_max_port=30999 ravbholua@ravi:/etc$ It doesn't make any difference even if I uncomments all lines which are commented as shown above in the config. file. Also have a look below to see what happens when bholu1 logs in ftp server: ravbholua@ravbholua-Aspire-5315:~$ ftp -p rs 10021 Connected to ravi.com. 220 (vsFTPd 3.0.2) Name (rs:ravbholua): bholu1 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> put soul.txt local: soul.txt remote: soul.txt 227 Entering Passive Mode (109,202,101,166,117,249). 553 Could not create file. ftp> mkdir a 550 Permission denied. ftp> May I request you to say what am I missing in my configuration.
Ravi (3913 rep)
Oct 20, 2013, 06:51 AM • Last activity: Jul 11, 2025, 07:05 AM
1 votes
1 answers
3784 views
Unable to establish FTPS connection with curl: "wrong version number" error across all TLS versions
I've looked at the related issues, but none of them have solved my issue. I'm trying to transfer files via FTP using `curl` to a server in my DMZ from an FTPS server on an EC2 server running `vsftpd`. $ curl ftps://ec2-myserver.compute.amazonaws.com --verbose --tlsv1.1 * Rebuilt URL to: ftps://ec2-m...
I've looked at the related issues, but none of them have solved my issue. I'm trying to transfer files via FTP using curl to a server in my DMZ from an FTPS server on an EC2 server running vsftpd. $ curl ftps://ec2-myserver.compute.amazonaws.com --verbose --tlsv1.1 * Rebuilt URL to: ftps://ec2-myserver.us-east-2.compute.amazonaws.com/ * Trying ip_addr... * TCP_NODELAY set * Connected to ec2-myserver.us-east-2.compute.amazonaws.com (ip_addr) port ---- (#0) * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.1 (OUT), TLS handshake, Client hello (1): * error:1408F10B:SSL routines:ssl3_get_record:wrong version number * Closing connection 0 I can get the file connection FTPS from Filezilla on a Windows server. I am getting the same error in every TLS version. I've tried enabling ssl3 on the vsfpd server, but it didn't solve it.
kroov (79 rep)
Jan 30, 2020, 01:17 PM • Last activity: Jul 3, 2025, 10:02 PM
0 votes
1 answers
6386 views
vsftpd fails to start due to configuration error: "status=2/INVALIDARGUMENT" in vsftpd.service
I am configuring with Ansible a VM running Ubuntu to run this FTP server: `vsftpd`, however after the installation when I inspect the logs with `journalctl -u vsftpd.service` I see: ``` Nov 20 17:49:58 my-vm systemd[1]: Starting vsftpd FTP server... Nov 20 17:49:58 my-vm systemd[1]: Started vsftpd F...
I am configuring with Ansible a VM running Ubuntu to run this FTP server: vsftpd, however after the installation when I inspect the logs with journalctl -u vsftpd.service I see:
Nov 20 17:49:58 my-vm systemd: Starting vsftpd FTP server...
Nov 20 17:49:58 my-vm systemd: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd: Stopping vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd: Stopped vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd: Starting vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 20 17:50:06 my-vm systemd: vsftpd.service: Failed with result 'exit-code'.
I am not sure what's wrong with the configuration I am setting at /etc/vsftpd.conf, this:
anonymous_enable=NO        # disable anonymous login
local_enable=YES           # permit local logins
write_enable=YES           # enable FTP commands which change the filesystem
local_umask=022            # value of umask for file creation for local users
dirmessage_enable=YES      # enable showing of messages when users first enter a new directory
xferlog_enable=YES         # a log file will be maintained detailing uploads and downloads
connect_from_port_20=YES   # use port 20 (ftp-data) on the server machine for PORT style connections
xferlog_std_format=YES     # keep standard log file format
listen=NO                  # prevent vsftpd from running in standalone mode
listen_ipv6=YES            # THIS DOES NOT FIX THE FOLLWING: 'journalctl -u vsftpd.service' gives: 'vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT'
pam_service_name=vsftpd    # name of the PAM service vsftpd will use
userlist_enable=YES        # enable vsftpd to load a list of usernames
tcp_wrappers=YES           # turn on tcp wrappers
ls_recurse_enable=YES      # allow to recursively inspect the file system (no problem with heavy I/O)
chroot_local_user=YES      # local users limited to their home directories after login (chroot jail)
allow_writeable_chroot=YES # allow chroot jail for local users to be writable
pasv_enable=YES            # enable passive connections
pasv_min_port=10000        # passive connections port range
pasv_max_port=10100        # passive connections port range
ssl_enable=YES             # enable FTPS
ssl_tlsv1=YES              # only TLS (not old SSL standards)
ssl_sslv2=NO               # only TLS (not old SSL standards)
ssl_sslv3=NO               # only TLS (not old SSL standards)
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- How can I make that FTP server daemon running without errors? - What's wrong with the configuration file?
TPPZ (637 rep)
Nov 20, 2019, 05:58 PM • Last activity: Jun 27, 2025, 05:02 PM
12 votes
5 answers
114297 views
vsftpd won't start: "systemd[1]: vsftpd.service: main process exited, code=exited, status=2/INVALIDARGUMENT"
I have Rapsberry Pi B+ with Arch Linux installation. `uname` reports version: [computer@computer001 ~]$ uname -a Linux computer001 3.18.3-3-ARCH #1 PREEMPT Mon Jan 26 20:10:28 MST 2015 armv6l GNU/Linux I've installed ftp server via `pacman -S vsftpd` and installation has passed without any errors. T...
I have Rapsberry Pi B+ with Arch Linux installation. uname reports version: [computer@computer001 ~]$ uname -a Linux computer001 3.18.3-3-ARCH #1 PREEMPT Mon Jan 26 20:10:28 MST 2015 armv6l GNU/Linux I've installed ftp server via pacman -S vsftpd and installation has passed without any errors. Then I tried to configure it, which resulted in following vsftpd.conf: anonymous_enable=NO local_enable=YES write_enable=YES #local_umask=022 anon_upload_enable=NO anon_mkdir_write_enable=NO dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES chown_uploads=YES chown_username=computer #xferlog_file=/var/log/vsftpd.log #xferlog_std_format=YES #idle_session_timeout=600 #data_connection_timeout=120 #nopriv_user=ftpsecure #async_abor_enable=YES #ascii_upload_enable=YES #ascii_download_enable=YES ftpd_banner=Welcome to personal ftp service. #deny_email_enable=YES #banned_email_file=/etc/vsftpd.banned_emails #chroot_local_user=YES #chroot_list_enable=YES #chroot_list_file=/etc/vsftpd.chroot_list ls_recurse_enable=YES listen=YES #listen_ipv6=YES Now, when I try to restart vsftpd, I get: [computer@computer001 etc]$ sudo systemctl restart vsftpd.service && systemctl status -l vsftpd.service * vsftpd.service - vsftpd daemon Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 1970-01-01 06:32:24 UTC; 112ms ago Process: 350 ExecStart=/usr/bin/vsftpd (code=exited, status=2) Main PID: 350 (code=exited, status=2) Here is also output of sudo journalctl | grep -i vsftp: Jan 01 06:32:24 computer001001 sudo: computer001 : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/usr/bin/systemctl restart vsftpd.service Jan 01 06:32:24 computer001001 systemd: Starting vsftpd daemon... Jan 01 06:32:24 computer001001 systemd: Started vsftpd daemon. Jan 01 06:32:24 computer001001 systemd: vsftpd.service: main process exited, code=exited, status=2/INVALIDARGUMENT Jan 01 06:32:24 computer001001 systemd: Unit vsftpd.service entered failed state. Jan 01 06:32:24 computer001001 systemd: vsftpd.service failed. Here is unit script /usr/lib/systemd/system/vsftpd.service: [Unit] Description=vsftpd daemon After=network.target [Service] ExecStart=/usr/bin/vsftpd ExecReload=/bin/kill -HUP $MAINPID KillMode=process [Install] WantedBy=multi-user.target If I run sudo /usr/bin/vsftpd, I get following error: 500 OOPS: config file not owned by correct user, or not a file I have corrected file permissions for /etc/vsftpd.conf via sudo chown root:root /etc/vsftpd.conf and now manually server gets started. I am also aware date/time is not correct, I haven't setup it yet.What am I missing?
KernelPanic (1276 rep)
Jan 27, 2015, 09:25 PM • Last activity: Jun 22, 2025, 01:51 PM
2 votes
1 answers
2584 views
Two vsftpd instances - check passive port on FTPS
I have configured VSFTPD in a CentOS machine to run on two instances, with vsftpd.conf and vsftpd2.conf. Here is the content of the second conf file: anonymous_enable=NO chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list chroot_local_user=YES connect_from_port_20=YES dirmessage_enable=Y...
I have configured VSFTPD in a CentOS machine to run on two instances, with vsftpd.conf and vsftpd2.conf. Here is the content of the second conf file: anonymous_enable=NO chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list chroot_local_user=YES connect_from_port_20=YES dirmessage_enable=YES force_local_data_ssl=YES force_local_logins_ssl=YES ftpd_banner=Hello. listen=YES listen_port=30 local_enable=YES local_umask=022 pam_service_name=vsftpd pasv_enable=YES pasv_address=192.168.100.162 pasv_max_port=389 pasv_min_port=389 rsa_cert_file=/etc/vsftpd/vsftpd.pem ssl_enable=YES ssl_sslv2=NO ssl_sslv3=NO ssl_tlsv1=YES ssl_ciphers=HIGH user_config_dir=/etc/vsftpd/user_conf userlist_enable=NO write_enable=YES xferlog_enable=YES xferlog_file=/var/log/xferlog2 xferlog_std_format=NO dual_log_enable=YES log_ftp_protocol=YES The first conf file is identical excepting the xferlog file, the listen_port that is missing, and the pasv_max_port/pasv_min_port that are 65000/60000 So I have one FTPS working on port 21 and the other on port 30. Both are working fine, but I want to make sure that 389 is really being used. So, I started a session with Wireshark, where I could see all my TCP packets to port 30, but no one to 389. Instead, I see packets to my remote server on port 49276. How can I make sure that this is working fine?
user73540 (21 rep)
Jun 25, 2014, 08:52 AM • Last activity: Jun 19, 2025, 11:04 AM
0 votes
1 answers
3480 views
How to limit a ftp user to only a given subdirectory?
I know this question is posted many times on StackExchange, but none of the solutions worked for me. I use vsftpd server on ubuntu and I want to restrict the access (read-only) for a user to a given subdirectory only. Most of the solutions I found said that changing the home-directory of a user does...
I know this question is posted many times on StackExchange, but none of the solutions worked for me. I use vsftpd server on ubuntu and I want to restrict the access (read-only) for a user to a given subdirectory only. Most of the solutions I found said that changing the home-directory of a user does the job: usermod -d /home/subdirectory with previously setting in /etc/vsftpd.conf: local_enable = YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list and add the username to /etc/vsftpd.chroot_list. Anyway, this works fine if I use a browser. It directs me to the given home directory and I cannot access its parents. The problem is when I use FileZilla. I connect directly to the home directory but I can also see and access the parent directories (and files within). I also tried some other solutions using sftp with editing the file /etc/ssh/sshd_config and using internal-sftp, but also doesn't work.
Mapl (111 rep)
Oct 4, 2015, 10:30 AM • Last activity: May 14, 2025, 02:10 PM
0 votes
1 answers
3001 views
Tell vsftpd to log to stdout instead of some file
By default, `vsftpd` logs to `/var/log/vsftpd.log`. `stdout` stays empty when started in foreground and I would like to utilize it so that it is easier. I don't really need to store the logs either. Help?
By default, vsftpd logs to /var/log/vsftpd.log. stdout stays empty when started in foreground and I would like to utilize it so that it is easier. I don't really need to store the logs either. Help?
nomad (491 rep)
Jun 20, 2020, 07:37 AM • Last activity: May 10, 2025, 04:04 PM
1 votes
1 answers
3954 views
FTP not giving permission for actions for user that has permission
I have a user on my server (Debian) that I will be using for FTP. For a given directory on the file system, he is able to create directories/create files. ``` myuser@debian-server:/storage$ su ftp_accesser Password: ftp_accesser@debian-server:/storage$ echo "foobar" > foobar.txt ftp_accesser@debian-...
I have a user on my server (Debian) that I will be using for FTP. For a given directory on the file system, he is able to create directories/create files.
myuser@debian-server:/storage$ su ftp_accesser
Password: 
ftp_accesser@debian-server:/storage$ echo "foobar" > foobar.txt
ftp_accesser@debian-server:/storage$ mkdir -v foobar2
mkdir: created directory 'foobar2'
ftp_accesser@debian-server:/storage$ ls -l
total 448380
drwxr-xr-x 2 root         root              4096 Mar 25 19:32 other_dir
drwxrwxr-x 2 ftp_accesser ftp_accesser      4096 Apr  9 11:32 foobar2
-rw-rw-r-- 1 ftp_accesser ftp_accesser       7 Apr  9 11:31 foobar.txt

ftp_accesser@debian-server:/storage$
I am also running the vsftpd server on this server. I attempt to do the same thing as above (with the files removed, of course) using the ftp client.
Connected to localhost.
220 (vsFTPd 3.0.3)
Name (localhost:myuser): ftp_accesser
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /storage
250 Directory successfully changed.
ftp> mkdir foobar3
550 Permission denied.
ftp> put /home/myuser/foobar.txt foobar.txt
local: /home/myuser/foobar.txt remote: foobar.txt
200 PORT command successful. Consider using PASV.
550 Permission denied.
ftp>
Is there a way to allow ftp_accesser to put/mkdir files onto the server?
Godot_finder (11 rep)
Apr 9, 2019, 06:42 PM • Last activity: May 10, 2025, 04:06 AM
1 votes
2 answers
29564 views
Job for vsftpd.service failed because the control process exited with error code
I can not restart the `vsftpd`. [root@localhost vsftpd]# service vsftpd restart Redirecting to /bin/systemctl restart vsftpd.service Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details. --- I use the...
I can not restart the vsftpd. [root@localhost vsftpd]# service vsftpd restart Redirecting to /bin/systemctl restart vsftpd.service Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details. --- I use the systemctl status vsftpd -l to check: [root@localhost ~]# systemctl status vsftpd -l ● vsftpd.service - Vsftpd ftp daemon Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2017-06-18 17:14:15 CST; 2h 49min ago Process: 33103 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=1/FAILURE) Jun 18 17:14:12 localhost.localdomain systemd: Starting Vsftpd ftp daemon... Jun 18 17:14:15 localhost.localdomain systemd: vsftpd.service: control process exited, code=exited status=1 Jun 18 17:14:15 localhost.localdomain systemd: Failed to start Vsftpd ftp daemon. Jun 18 17:14:15 localhost.localdomain systemd: Unit vsftpd.service entered failed state. Jun 18 17:14:15 localhost.localdomain systemd: vsftpd.service failed. ---- And be attention, in my /etc/vsftpd/vsftpd.conf, I have changed the : listen=YES listen_ipv6=NO ---- I use the journalctl -xe, I get the below information: [root@localhost vsftpd]# journalctl -xe (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza Jun 18 20:09:46 localhost.localdomain polkitd: /etc/polkit-1/rules.d/49-p (pkla-check-authorization: ' Jun 18 20:09:46 localhost.localdomain polkitd: Error evaluating authoriza
three-blocks (453 rep)
Jun 18, 2017, 09:24 AM • Last activity: May 3, 2025, 01:03 AM
0 votes
1 answers
70 views
FTP unable to write to a mounted drive
I'm using Mint Linux 22.1 and vsftpd on the destination computer and Windows 11 (latest version) as the source computer. I have the following permissions. In my home directory I have a symlink to a mounted NTFS drive: [![enter image description here][1]][1] The permissions to the mounted NTFS drive'...
I'm using Mint Linux 22.1 and vsftpd on the destination computer and Windows 11 (latest version) as the source computer. I have the following permissions. In my home directory I have a symlink to a mounted NTFS drive: enter image description here The permissions to the mounted NTFS drive's directories are: enter image description here I have added FACL permissions to each directory making todd an owner of each directory (also did a chown from root to todd in a separate, unsuccessful attempt). **Upon further investigation it appears the setfacl didn't actually do anything (apparently due to the file system being NTFS). So, now the question becomes why didn't the chown where I set my user account as owner solve the problem?** I have set write_enable=YES in the /etc/vsftpd.conf file When I try accessing the symlink using Windows 11's file explorer: ftp://todd@192.168.40.77/NTFS2TB/backups/ I can see files and directories within the NTFS2TB directory, but I cannot upload any files into it. What do I need to do to enable uploading files to the Linux computer's backups directory from Windows 11? EDIT: Showing the filesystem of NTFS2TB is NTFS enter image description here EDIT 2: The vsftpd.log file entry for an attempt to upload is as follows: Sat Apr 26 16:33:42 2025 [pid 6734] CONNECT: Client "::ffff:192.168.40.161" Sat Apr 26 16:33:42 2025 [pid 6733] [todd] OK LOGIN: Client "::ffff:192.168.40.161" Sat Apr 26 16:33:42 2025 [pid 6736] [todd] FAIL DELETE: Client "::ffff:192.168.40.161", "/media/todd/NTFS_PARTITION_2TB/backups/DumpStack.log" EDIT 3: I converted the drive from NTFS to EXT4 and it works now! Thanks everyone.
Todd (101 rep)
Apr 26, 2025, 08:38 PM • Last activity: Apr 28, 2025, 10:28 PM
0 votes
4 answers
26949 views
Centos: VSFTPD not Starting
I have a minimal install of Centos in VirtualBox. I want to run a ftp service to share files between the host and my VM, and then learn about ftp servers. I installed vsftpd and changed the vsftpd.conf file as bellow: anonymous_enable=NO local_enable=YES write_enable=YES local_umask=O22 dirmessage_e...
I have a minimal install of Centos in VirtualBox. I want to run a ftp service to share files between the host and my VM, and then learn about ftp servers. I installed vsftpd and changed the vsftpd.conf file as bellow: anonymous_enable=NO local_enable=YES write_enable=YES local_umask=O22 dirmessage_enable=YES xferlog_enable=YES connect_from_port 2O=YES xferlog_std format=YES chroot_local_user=YES listen_ipv6=YES pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES But, when I type service vsftpd start I get the following error: > _Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details._ Is this issue happening due of a wrong config as showed above, or is it something else? What can I do to start my ftp server? **EDIT** Output of systemctl status -l vsftpd.service [user@localhost vsftpd]$ systemctl status -l vsftpd.service vsftpd.service - Vsftpd ftp daemon Loaded: loaded (/usr/lib/systemd/system/vsftpd.service, disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Ter 2017-05-09 21:03:19 -03; 3min 2s ago Process: 3047 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited status=2) Mai 09 21:03:19 localhost.localdomain systemd: Starting Vsftpd ftp daemon... Mai 09 21:03:19 localhost.localdomain systemd: vsftpd.service: control process exited, code=exited status=2 Mai 09 21:03:19 localhost.localdomain systemd: Failed to start Vsftpd ftp daemon. Mai 09 21:03:19 localhost.localdomain systemd: Unit vsftpd.service entered failed state. Mai 09 21:03:19 localhost.localdomain systemd: vsftpd.service failed. [user@localhost vsftpd]$
tdmsoares (147 rep)
May 11, 2017, 11:20 PM • Last activity: Mar 22, 2025, 03:43 AM
1 votes
2 answers
5963 views
Ubuntu - VSFTPD configuration for FTP fails on restart
I need to set up a FTP server within my Ubuntu virtual box but I'm having problems within configuration of the config file within VSFTPD From online tutorials I keep seeing different options being selected and different reasoning, I just need a simple and secure configuration without enable settings...
I need to set up a FTP server within my Ubuntu virtual box but I'm having problems within configuration of the config file within VSFTPD From online tutorials I keep seeing different options being selected and different reasoning, I just need a simple and secure configuration without enable settings I do not understand. So far I have selected to use the following options within **/etc/vsftpd.conf**
Listen=NO
Anonymous_enable=NO
Local_enable=YES
wrtite_enable=YES
dirmessage_enable=YES
use_localtime=YES
connect_from_port_20=YES
xferlog_enable=YES
ftpd_banner=Welcome to Toms FTP Server.
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
From my understanding these options do the following: * listen enables standalone, * anonymous denies non verified login, * write_enable allows to write files, * dirmessage_enable is directory explaining, * use_localtime is the time used for dating files, * connect_from_port_20 is self explanatory, * xferlog_enable is a log creation/format type?, * ftpd_banner is self explanatory, * chroot_local_user specifies users are restricted to their directory, users not restricted to their directory are listed within chroot_list_file. The problem I am having is, I keep seeing references in tutorials regarding a userlist which will state which users do have access like this:
user_sub_token=$USER
local_root=/home/$USER/ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
This does not exist in my file and whenever I try to enter it manually it causes my VSFTPD to fail start up when restarting, I see this in almost every tutorial but it is not contained within my configuration files??? Am I trying to configure this wrong? What is the minimum requirements for a safe VSFTPD configuration? Is this user list no-longer supported? Do I even need this user list? error code also does not disappear removing these files and restarting again, it completely breaks the service and requires a re installation every single time, the error code is as follows:
systemctl status vsftpd.service

● vsftpd.service - vsftpd FTP server
   Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-04-26 13:58:09 UTC; 14min ago
  Process: 30588 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)
  Process: 30584 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
 Main PID: 30588 (code=exited, status=2)

Apr 26 13:58:09 ubuntu systemd: Starting vsftpd FTP server...
Apr 26 13:58:09 ubuntu systemd: Started vsftpd FTP server.
Apr 26 13:58:09 ubuntu systemd: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 26 13:58:09 ubuntu systemd: vsftpd.service: Failed with result 'exit-code'.
throwaway56786897 (13 rep)
Apr 26, 2020, 02:11 PM • Last activity: Mar 22, 2025, 03:32 AM
0 votes
0 answers
44 views
vsftpd FTPS server does NOT allow login
I recently setup an Arch Linux server running an FTPS vsftpd server, I am more or less new to this field, especially with this program so I'm sorry if I may come off as ignorant My issue is that I cannot log into my vsftpd server, no matter what user I am in. This problem persists even if I set the...
I recently setup an Arch Linux server running an FTPS vsftpd server, I am more or less new to this field, especially with this program so I'm sorry if I may come off as ignorant
My issue is that I cannot log into my vsftpd server, no matter what user I am in. This problem persists even if I set the server into anonymous login mode, it establishes a TLS connection but does FireZilla blames '530 Login Incorrect' and WinSCP tells me 'Access Denied'
I have hit a roadblock on what to do, here is what i've tried to do - set pam_service_module from vsftpd to ftp - disabled chroot_local_user - disabled check_shell - made a new user and added it as both a sudoer and the ftp group - checked over god knows many times my login details and even tried anon login - remade /home directories for my users - added a chroot list with my users in the file here are the contents of my vsftpd.conf file :
ssl_enable

rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem

ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH

force_local_logins_ssl=YES
force_local_data_ssl=YES

pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
listen_port=990

local_enable=YES
write_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

xferlog_enable=YES
xferlog_std_format=YES
xferlog_file=/var/log/vsftpd.log

anonymous_enable=NO
pam_service_name=ftp
check_shell=NO
ANY help is appreciated, thank you
Walanao (1 rep)
Feb 11, 2025, 12:15 AM • Last activity: Feb 11, 2025, 12:30 AM
1 votes
1 answers
46 views
How to prevent user from going to upper directory by vsftpd, in Ubuntu
The directories and the access setting is like below. /home/directoroy1 rwxr-xr-x 4 user1 user1 4096 /home rwxrwxr-x 5 root root 4096 And in vsftpd.conf, I set like below. chroot_local_user=YES allow_writeable_chroot=YES And then restart vsftpd as below. systemctl restart vsftpd However whenever I t...
The directories and the access setting is like below. /home/directoroy1 rwxr-xr-x 4 user1 user1 4096 /home rwxrwxr-x 5 root root 4096 And in vsftpd.conf, I set like below. chroot_local_user=YES allow_writeable_chroot=YES And then restart vsftpd as below. systemctl restart vsftpd However whenever I test with Filezilla with the ID user1, firstly it goes to it's designated directory /home/directory1, but I can still see .. and able to click it to see upper directory. I can even go see every other directory including root directory, with user1. Where did I do wrong?
Chihyun Ahn (21 rep)
Nov 12, 2024, 11:49 PM • Last activity: Nov 20, 2024, 10:32 AM
0 votes
0 answers
55 views
Running vsftpd in Docker (Swarm)
I want to use a vsftp-Server in my Docker Swarm but having some network issues. I have the following compose-file: services: vsftpd: container_name: vsftpd image: million12/vsftpd restart: always volumes: - /whatever:/var/ftp/:ro environment: - ANONYMOUS_ACCESS=true - LOG_STDOUT=true - CUSTOM_PASSIV...
I want to use a vsftp-Server in my Docker Swarm but having some network issues. I have the following compose-file: services: vsftpd: container_name: vsftpd image: million12/vsftpd restart: always volumes: - /whatever:/var/ftp/:ro environment: - ANONYMOUS_ACCESS=true - LOG_STDOUT=true - CUSTOM_PASSIVE_ADDRESS="" ports: - 20-21:20-21 - 21100-21110:21100-21110 #network_mode: "host" If i run this compose file with docker compose and network mode "host" then i can easily connect to it. If i run it without network mode "host" i have the following output: Status: Angemeldet Status: Empfange Verzeichnisinhalt... Befehl: PWD Antwort: 257 "/" is the current directory Befehl: TYPE I Antwort: 200 Switching to Binary mode. Befehl: PASV Antwort: 500 OOPS: invalid pasv_address Befehl: PORT 10,10,10,102,10,187 Fehler: Verbindung vom Server geschlossen I can see the login in the output of the vsftp-Server: vsftpd | [VSFTPD 16:46:41] VSFTPD daemon starting vsftpd | Tue Nov 19 16:46:45 2024 [pid 33] CONNECT: Client "" vsftpd | Tue Nov 19 16:46:45 2024 [pid 32] [ftp] OK LOGIN: Client "", anon password "anonymous@example.com" I have the same results if i run it on swarm. It seems like im having issues with the "passive ports" and the docker network. Unfortunately there is no "network_mode: host" in swarm (even if i pin the service to a host) Is there a possibility to run vsftpd in passive Mode in Swarm like Compose with Network-Mode ? Or are there other ways to bring up a *working* ftp-Server in Swarm?
swarmer91 (1 rep)
Nov 19, 2024, 05:09 PM
-1 votes
3 answers
2321 views
vsftpd: pam_userdb permission denied
I've been trying to set up VSFTPD on Centos 6.6 to allow virtual users. Below is my `vsftpd.conf`, which is configured to allow only virtual users in `/etc/vsftpd/vsftpd-virtual-user.db`. listen=YES local_umask=002 anonymous_enable=NO local_enable=YES virtual_use_local_privs=YES write_enable=YES pam...
I've been trying to set up VSFTPD on Centos 6.6 to allow virtual users. Below is my vsftpd.conf, which is configured to allow only virtual users in /etc/vsftpd/vsftpd-virtual-user.db. listen=YES local_umask=002 anonymous_enable=NO local_enable=YES virtual_use_local_privs=YES write_enable=YES pam_service_name=vsftpd_virtual guest_enable=YES local_root=/var/sites chroot_local_user=YES hide_ids=YES connect_from_port_20=YES pasv_enable=YES pasv_addr_resolve=YES pasv_address=10.175.9.23 pasv_min_port=1024 pasv_max_port=65535 I have also set up the vsftpd_virtual module in /etc/pam.d/vsftpd_virtual which contains the following: #%PAM-1.0 auth required pam_userdb.so db=/etc/vsftpd/vsftpd-virtual-user account required pam_userdb.so db=/etc/vsftpd/vsftpd-virtual-user session required pam_loginuid.so When trying to log in to FTP on localhost, I'm getting a 530 error from FTP and the following line in /var/log/secure: vsftpd: pam_userdb(vsftpd_virtual:auth): user_lookup: could not open database `/etc/vsftpd/vsftpd-virtual-user': Permission denied The file permissions for the database file seem fine, but I may be wrong: Access: (0777/-rwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
tombazza (1 rep)
Mar 16, 2015, 01:50 PM • Last activity: Oct 31, 2024, 04:08 AM
0 votes
0 answers
39 views
configure "vsftpd" for certificate revocation
Is there a way to provide `vsftpd` with CRL? The man page does not seem to have any option for the same and neither googling helped. Appreciate response.
Is there a way to provide vsftpd with CRL? The man page does not seem to have any option for the same and neither googling helped. Appreciate response.
Fazlin (281 rep)
Aug 20, 2024, 03:19 PM
1 votes
3 answers
2192 views
VSFTP local user works, but PAM users Permission Denied
I am attempting to configure `vsftp` to use PAM to authenticate virtual users on my Arch server. It seems so straight forward, I must be missing something simple. ### Configuration + local user `virtualftp` in group `virtualftp` + folders `/srv/ftp` and `/srv/ftp/test1` owned by `virtualftp:virtualf...
I am attempting to configure vsftp to use PAM to authenticate virtual users on my Arch server. It seems so straight forward, I must be missing something simple. ### Configuration + local user virtualftp in group virtualftp + folders /srv/ftp and /srv/ftp/test1 owned by virtualftp:virtualftp + PAM user test1 with password test1p in /etc/vsftpd_login.db #### /etc/pam.d/vsftpd auth required pam_userdb.so db=/etc/vsftpd_login crypt=hash account required pam_userdb.so db=/etc/vsftpd_login crypt=hash session required pam_loginuid.so #### /etc/vsftp.conf anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES ftpd_banner=Welcome to MCID's FTP server. chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list listen=YES # nopriv_user=virtualftp # SSL Configuration # ssl_enable=YES # allow_anon_ssl=NO # force_local_data_ssl=NO # force_local_logins_ssl=YES # ssl_tlsv1=YES # ssl_sslv2=YES # ssl_sslv3=YES # rsa_cert_file=/etc/ssl/certs/vsftpd.pem # rsa_private_key_file=/etc/ssl/certs/vsftpd.pem # Passive Port Range pasv_min_port=49152 pasv_max_port=65534 # Added settings for PAM virtualftp logins pam_service_name=vsftpd guest_enable=YES guest_username=virtualftp virtual_use_local_privs=YES # Private folders for virtual users local_root=/srv/ftp/$USER user_sub_token=$USER Currently I can login with sftp://theherk@sftp.example.com (my local user) just fine. However, if I attempt to login with test1, I get "permission denied". What am I missing or confused about?
theherk (111 rep)
Dec 12, 2013, 06:30 AM • Last activity: Jul 10, 2024, 02:55 PM
1 votes
0 answers
404 views
Unable to start vsftpd.service on Centos9 Stream using Virtualbox
I'm unable to start the vsftpd.service. Here's the error I get when I try to start it ``` Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xeu vsftpd.service" for details. ``` This is the result of running ```jou...
I'm unable to start the vsftpd.service. Here's the error I get when I try to start it
Job for vsftpd.service failed because the control process exited with error code.
See "systemctl status vsftpd.service" and "journalctl -xeu vsftpd.service" for details.
This is the result of running
-xeu vsftpd.service
Jun 04 18:30:30 centos2 systemd: Failed to start Vsftpd ftp daemon.
░░ Subject: A start job for unit vsftpd.service has failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support 
░░ 
░░ A start job for unit vsftpd.service has finished with a failure.
░░ 
░░ The job identifier is 9077 and the job result is failed.
This is what I get when I run
systemctl status vsftpd.service
× vsftpd.service - Vsftpd ftp daemon
     Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Tue 2024-06-04 18:33:30 EDT; 4min 22s ago
    Process: 49019 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=1/FAILURE)
        CPU: 1ms

Jun 04 18:33:27 centos2 systemd: Starting Vsftpd ftp daemon...
Jun 04 18:33:30 centos2 systemd: vsftpd.service: Control process exited, code=exited, status=1/FAILURE
Jun 04 18:33:30 centos2 systemd: vsftpd.service: Failed with result 'exit-code'.
Jun 04 18:33:30 centos2 systemd: Failed to start Vsftpd ftp daemon.
I have visited numerous forums and modified
/etc/vsftpd/vsftpd.conf
in several ways to no avail. Here is the current status of
/etc/vsftpd/vsftpd.conf
without the commented out lines
anonymous_enable=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=fdin
xferlog_std_format=YES
chroot_local_user=YES
listen=YES

pam_service_name=ftpd
userlist_enable=YES
tcp_wrappers=YES
Here is the result of doing
ss -tlpn | grep :21
LISTEN 0      32                 *:21              *:*    users:(("vsftpd",pid=47793,fd=3))
frank din (21 rep)
Jun 4, 2024, 10:42 PM • Last activity: Jun 5, 2024, 07:22 PM
0 votes
2 answers
447 views
Why vsftpd don't respect passive port range?
I configure vsftpd for passive mode listen=YES log_ftp_protocol=YES pasv_enable=YES pasv_address=192.168.0.2 pasv_min_port=10090 pasv_max_port=10100 It works but use random ports! Look output of ss during transfer tcp ESTAB 0 0 192.168.0.2:33150 192.168.0.2:21 users:(("ncftp",pid=14411,fd=4)) timer:...
I configure vsftpd for passive mode listen=YES log_ftp_protocol=YES pasv_enable=YES pasv_address=192.168.0.2 pasv_min_port=10090 pasv_max_port=10100 It works but use random ports! Look output of ss during transfer tcp ESTAB 0 0 192.168.0.2:33150 192.168.0.2:21 users:(("ncftp",pid=14411,fd=4)) timer:(keepalive,119min,0) uid:1000 ino:236010 sk:400b cgroup:unreachable:1 tcp ESTAB 0 0 192.168.0.2:44985 192.168.0.2:20 users:(("ncftp",pid=14411,fd=7)) timer:(keepalive,119min,0) uid:1000 ino:246607 sk:4011 cgroup:unreachable:1 this is ok..without firewall, with firewall and redirect port for nat is a serious problem Why vsftpd use random ports? I have tried listen_ipv6=NO and disable pasv_address option. But nothing This is the complete configuration, actually anonymous_enable=YES connect_from_port_20=NO dirmessage_enable=YES ftpd_banner=Welcome listen=YES listen_ipv6=NO local_umask=022 log_ftp_protocol=YES ls_recurse_enable=YES pasv_address=192.168.0.2 pasv_enable=YES pasv_max_port=10100 pasv_min_port=10090 seccomp_sandbox=NO xferlog_enable=YES xferlog_file=/var/log/vsftpd.log xferlog_std_format=YES I have tried it on Slackware 15 and Debian 12 This is an example: ncftp works but don't respect the passive port range ftp works, but don't respect the passive port range ftp -p 192.168.0.2 Connected to 192.168.0.2 (192.168.0.2). 220 Welcome Name (192.168.0.2:me): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd pub 250 Directory successfully changed. ftp> get 4.mkv local: 4.mkv remote: 4.mkv 227 Entering Passive Mode (192,168,0,2,39,112). 150 Opening BINARY mode data connection for 4.mkv (12904291 bytes). 226 Transfer complete. 12904291 bytes received in 0,0272 secs (473899,78 Kbytes/sec)
elbarna (13690 rep)
Mar 25, 2024, 10:11 AM • Last activity: Mar 25, 2024, 05:19 PM
Showing page 1 of 20 total questions