Error after image upload on remote server

Since I moved a page to the remote server, I get this error when uploading any file in the panel:

rename(/tmp/12ab34cde5678.filename.jpg,/website/content/path/to/filename.jpg) [function.rename.php]: Operation not permitted

My Server:
Apache
PHP Version: 8.2.3
MySQL: 10.3-MariaDB

Kirby Version: 3.9.1

Any help?

Are other operations possible?

Everything else works fine. I can add pages, edit content etc.
It’s just the file/image upload that keeps throwing this error and it happens on every page on file fields and file sections equally.

Even though you get the error does the move still work?

I believe rename is an atomic operation, the old file cannot exist at the same time as the new file therefore it’s not atomic and throws an error but usually still works regardless.

No, although it seems that the file gets uploaded. When I click the error message away, there is no uploaded image visible, but when I retry, a new error message

A file with the name “file.jpg” already exists

shows up.
I can actually find the uploaded file in my content folder together with an empty file.jpg.txt file but I have no access to it in the panel. It happens to all files with different file blueprints.

This is really critical, because the file upload is the primary function of the website’s cms, my client needs to upload his work (it’s a website for a photographer).

Could you check if you find more information in the PHP error logs?

Same Problem here, as reported via Discord:

I updated a Kirby instance from 3.8.2 to 3.9.1 and get the following error on any file upload via the panel:

rename(/var/tmp/63ff456e3cb06.filename.zip,/home/www/00/29/folderxyz/.sub-cd/content/folder-a/folder-b/filename.zip): Operation not permitted

Nevertheless the file is being uploaded but no corresponding .txt-file is generated. As a result it´s not showing up in the panel.
I rolled back to 3.8.2 and everything works fine. On my local devcontainer uploads in both versions work. Devcontainer and live system are running on PHP 8.0. I also checked PHP 8.1 and 8.2 with the same result.

There is nothing to be found in my error log in this regard.

Same. Nothing found in my PHP error logs.

Just checked and there is already an issue on GitHub: Error message on upload "Operation not permitted" · Issue #5024 · getkirby/kirby · GitHub