# Can't push file to my VSFTPD Server - 553 Could not create file error

**URL:** <https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306>\
**Category:** UNIX for Beginners Q & A\
**Created:** [September 29, 2025, 9:51am UTC](https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306 "2025-09-29T09:51:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiruba](https://community.unix.com/user_avatar/community.unix.com/kiruba/32/23172_2.png) [@Kiruba](https://community.unix.com/u/Kiruba)\
**Post date:** [September 29, 2025, 9:51am UTC](https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306/1 "2025-09-29T09:51:58Z")

</div>

I’ve set up a VSFTPD server on my Fedora 42 server for learning. I’ve shared my config file along with Firewalld and selinux status. I could able to login to the server via `ftpuser` which is allowed in the config file.

But the thing is when I execute `put /tmp/index.html` it throws an error (mentioned below), While executing `put /tmp/index.html index.html` works perfectly fine. Why?

I feel like it’s either my config file or SELinux causing this issue.

> **Config file**
>
> #Disable anonymous  
> anonymous\_enable=NO
> 
> #Allows localusers  
> local\_enable=YES
> 
> #To Allow users to upload  
> write\_enable=YES  
> allow\_writeable\_chroot=YES
> 
> #To provide default permissions  
> local\_umask=022
> 
> #Welcome Banner  
> ftpd\_banner=Welcome to The private company
> 
> #Jail user within the home directory  
> chroot\_local\_user=YES
> 
> listen=YES
> 
> #PAM authentication  
> pam\_service\_name=vsftpd
> 
> #Only the mentioned users can able to access the FTP server.  
> userlist\_enable=YES  
> userlist\_file=/etc/vsftpd/allowed\_users  
> userlist\_deny=NO

> **SELinux O/P**
>
> ftpd\_anon\_write --\> off  
> ftpd\_connect\_all\_unreserved --\> off  
> ftpd\_connect\_db --\> off  
> ftpd\_full\_access --\> off  
> ftpd\_use\_cifs --\> off  
> ftpd\_use\_fusefs --\> off  
> ftpd\_use\_nfs --\> off  
> ftpd\_use\_passive\_mode --\> off  
> httpd\_can\_connect\_ftp --\> off  
> httpd\_enable\_ftp\_server --\> off  
> tftp\_anon\_write --\> off  
> tftp\_home\_dir --\> on

> **Error O/P**
>
> kiruba@QubeFed:/tmp$ ftp localhost  
> Trying ::1...  
> ftp: connect to address ::1Connection refused  
> Trying 127.0.0.1...  
> Connected to localhost (127.0.0.1).  
> 220 Welcome to The private company  
> Name (localhost:kiruba): ftpuser  
> 331 Please specify the password.  
> Password:  
> 230 Login successful.  
> Remote system type is UNIX.  
> Using binary mode to transfer files.  
> ftp\> ls  
> 227 Entering Passive Mode (127,0,0,1,181,243).  
> 150 Here comes the directory listing.  
> drwxr-xr-x 1 1001 1001 16 Sep 29 05:40 files  
> 226 Directory send OK.  
> ftp\>  
> ftp\>  
> ftp\> put /tmp/index.html  
> local: /tmp/index.html remote: /tmp/index.html  
> 227 Entering Passive Mode (127,0,0,1,136,228).  
> 553 Could not create file.  
> ftp\> put /tmp/index.html file  
> local: /tmp/index.html remote: file  
> 227 Entering Passive Mode (127,0,0,1,178,174).  
> 150 Ok to send data.  
> 226 Transfer complete.  
> 19301 bytes sent in 8.6e-05 secs (224430.24 Kbytes/sec)  
> ftp\> dir  
> 227 Entering Passive Mode (127,0,0,1,237,127).  
> 150 Here comes the directory listing.  
> -rw-r--r-- 1 1001 1001 19301 Sep 29 08:53 file  
> drwxr-xr-x 1 1001 1001 16 Sep 29 05:40 files  
> 226 Directory send OK.  
> ftp\> cd files  
> 250 Directory successfully changed.  
> ftp\> ls  
> 227 Entering Passive Mode (127,0,0,1,224,113).  
> 150 Here comes the directory listing.  
> -rw-r--r-- 1 1001 1001 12 Sep 29 05:40 testfile  
> 226 Directory send OK.  
> ftp\> put /tmp/index.html  
> local: /tmp/index.html remote: /tmp/index.html  
> 227 Entering Passive Mode (127,0,0,1,30,62).  
> 553 Could not create file.  
> ftp\> put /tmp/index.html index.html  
> local: /tmp/index.html remote: index.html  
> 227 Entering Passive Mode (127,0,0,1,75,209).  
> 150 Ok to send data.  
> 226 Transfer complete.  
> 19301 bytes sent in 0.000114 secs (169307.01 Kbytes/sec)  
> ftp\>  
> 221 Goodbye.

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [September 29, 2025, 9:58am UTC](https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306/2 "2025-09-29T09:58:21Z")

</div>

Test using any of these below @Kiruba ; all avoid sending an absolute path as the remote name and see

1. Try explicitly set the remote name like this:

```plaintext
put /tmp/index.html index.html

```

1. Or change to the local dir first, then upload basename:

```plaintext
lcd /tmp
put index.html

```

1. Or tell the client to put it in the current remote directory:

```plaintext
put /tmp/index.html .

```

Let us know how these tests perform.

#### Note:

If you truly want `/tmp/index.html` to work, **create `/tmp` inside the chroot** and make it writable (usually cosidered a bad idea for a jailed FTP tree, but you need to evaluate your own risk management profile, etc).

---

<div class="post-metadata">

**Author:** ![Kiruba](https://community.unix.com/user_avatar/community.unix.com/kiruba/32/23172_2.png) [@Kiruba](https://community.unix.com/u/Kiruba)\
**Post date:** [September 29, 2025, 10:19am UTC](https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306/3 "2025-09-29T10:19:44Z")

</div>

Thanks @Neo for the response, this is for learning purpose. I tried your steps and it works.

So, the thing is will **vsftpd** service works this way? Should we explicitly mention the file name in the remote destination? if not it doesn’t seems to create a file on its own.

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [September 29, 2025, 1:15pm UTC](https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306/4 "2025-09-29T13:15:28Z")

</div>

> [@Kiruba](#):
>
> So, the thing is will **vsftpd** service works this way? Should we explicitly mention the file name in the remote destination? if not it doesn’t seems to create a file on its own.

### ChatGPT 5.0 replies, thus:

The short answer: **yes, vsftpd works exactly this way**. It doesn’t auto-strip paths for you; it stores files using whatever remote pathname the client asks for.

### Why this happens

- `put /tmp/index.html`  
→ your client sends `STOR /tmp/index.html`.  
Since your vsftpd user is jailed (`chroot_local_user=YES`), there is no `/tmp/` directory inside the FTP root. Server returns `553 Could not create file.`

- `put /tmp/index.html index.html`  
→ your client sends `STOR index.html`.  
That’s just a plain filename in the current remote directory, so it works.

Different FTP clients vary in how they guess the remote name when you don’t give one. Some will automatically strip to the basename, others will send the full local path. Yours does the latter.

### What this means for you

- It’s not a bug in vsftpd or SELinux. It’s **client behavior + chrooted filesystem**.

- If you don’t want to type two arguments every time:

So yes: **unless you explicitly tell it otherwise, vsftpd will literally try to create whatever remote path the client asks for**. If that path doesn’t exist in the chroot, you get the 553 error.

---

<div class="post-metadata">

**Author:** ![system](https://community.unix.com/uploads/default/original/2X/c/c7e9e16a595259edafe88615719d5c5dcda035c2.png) [@system](https://community.unix.com/u/system)\
**Post date:** [March 28, 2026, 1:16pm UTC](https://community.unix.com/t/cant-push-file-to-my-vsftpd-server-553-could-not-create-file-error/397306/5 "2026-03-28T13:16:24Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
