watchfs: file is empty after changing it in the file system.
Describe the bug
Given user "Alice" has uploaded file with content "content" to "test.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
When the administrator moves the file "test.txt" to the folder "firstFolder" for user "Alice" on the POSIX filesystem # CliContext::theAdministratorMovesFileToFolder()
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
And the content of file "/firstFolder/test.txt" for user "Alice" should be "content" # FeatureContext::contentOfFileForUserShouldBe()
The content was expected to be 'content', but actually is ''. HTTP status was 200
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'content'
+''
Steps to reproduce
no way to reproduce it localy. When I skipped all tests in CI except of collaborativePosix/collaborativePosixFS.feature -> test was green
Expected behavior
File has content
Actual behavior
File is exist but empty. here is log https://ci.opencloud.eu/repos/3/pipeline/174/88
- Issue
Sometimes Alice cannot find the file, and after 10 attempts to request the file, the tests end with an error.
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
And the content of file "/firstFolder/test.txt" for user "Alice" should be "content" # FeatureContext::contentOfFileForUserShouldBe()
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:02 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:03 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:04 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:05 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:06 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:07 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:08 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:09 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:11 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Thu, 30 Oct 2025 13:09:12 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: collaborativePosix/collaborativePosixFS.feature:88-92
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β
Expected status code to be '200', but got '425' (Exception)
And as "Alice" file "/test.txt" should not exist # FeatureContext::asFileOrFolderShouldNotExist()
- File stills exist sfter deleting in file system
Scenario: delete file # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature:96
Given user "Alice" has uploaded file with content "content" to "test.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
When the administrator deletes the file "test.txt" for user "Alice" on the POSIX filesystem # CliContext::theAdministratorDeletesFile()
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
And as "Alice" file "/test.txt" should not exist # FeatureContext::asFileOrFolderShouldNotExist()
file '/test.txt' should not exist. But it does.
https://ci.opencloud.eu/repos/3/pipeline/202/149
ΡΡ @rhafer @fschade
in the CI run of my PR #1746 you can find a log
In https://github.com/opencloud-eu/opencloud/pull/1762 I've added a check for the 425 code, to make sure the postprocessing is finished before going to the next step. But now when I run the tests locally, some other tests never get out of the 425 loop or never get a 425, but the file is still not readable.
e.g. from tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature:74
When the administrator renames the file "test.txt" to "new-name.txt" for user "Alice" on the POSIX filesystem # CliContext::theAdministratorRenamesFile()
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
And the content of file "/new-name.txt" for user "Alice" should be "content" # FeatureContext::contentOfFileForUserShouldBe()
β ### AUTH: Alice:123456
β ### REQUEST: GET https://opencloud-server:9200/remote.php/dav/files/Alice/new-name.txt
β Headers:
β Host: opencloud-server:9200
β Body:
β string(0) ""
β
β ### END REQUEST
β ### RESPONSE
β Status: 200
β Headers:
β Accept-Ranges: bytes
β Content-Disposition: attachment; filename*=UTF-8''new-name.txt; filename="new-name.txt"
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Content-Type: text/plain; charset=UTF-8
β Date: Mon, 03 Nov 2025 11:11:03 GMT
β Etag: "ed9e3186e0859ef335504d0ec62df53a"
β Last-Modified: Mon, 03 Nov 2025 11:11:02 +0000
β Oc-Checksum: SHA1:da39a3ee5e6b4b0d3255bfef95601890afd80709
β Oc-Etag: "ed9e3186e0859ef335504d0ec62df53a"
β Oc-Fileid: 784a8cf3-2f3c-4ac1-87c2-7c973931fa82$a36f1a09-b059-4b54-a420-38142a0fe643!684a7a7a-04a3-4dc3-bf00-0824fb9f7059
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: a22dc5e8c1c0/3luE732Qf4-000032
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β
The content was expected to be 'content', but actually is ''. HTTP status was 200
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'content'
+''
same happens with tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature:88
But at other times I get
Scenario: move file to folder # /home/artur/www/opencloud/opencloud/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature:88
Given user "Alice" has uploaded file with content "content" to "test.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
When the administrator moves the file "test.txt" to the folder "firstFolder" for user "Alice" on the POSIX filesystem # CliContext::theAdministratorMovesFileToFolder()
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
And the content of file "/firstFolder/test.txt" for user "Alice" should be "content" # FeatureContext::contentOfFileForUserShouldBe()
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Mon, 03 Nov 2025 11:01:21 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: a22dc5e8c1c0/aHw6uOUz03-000032
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
......
β ### RESPONSE
β Status: 425
β Headers:
β Content-Length: 0
β Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome-apps/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'
β Date: Mon, 03 Nov 2025 11:01:30 GMT
β Referrer-Policy: strict-origin-when-cross-origin
β Strict-Transport-Security: max-age=315360000; preload
β Vary: Origin
β X-Content-Type-Options: nosniff
β X-Frame-Options: SAMEORIGIN
β X-Permitted-Cross-Domain-Policies: none
β X-Request-Id: a22dc5e8c1c0/aHw6uOUz03-000053
β X-Robots-Tag: none
β X-Xss-Protection: 1; mode=block
β Body:
β string(0) ""
β
β ### END RESPONSE
β
Expected status code to be '200', but got '425' (Exception)
Reopening this, because I think it is not solved yet. I'm still running into the issue when moving/renaming files. Even trying to download them via WebDAV, does not return a 425 and so the test fails
Here's another one: https://ci.opencloud.eu/repos/3/pipeline/288/88
## Scenario: copy file to folder (collaborativePosix/collaborativePosixFS.feature:67)
### Given the config "STORAGE_USERS_POSIX_WATCH_FS" has been set to "true"
### And user "Alice" has been created with default attributes
_______________________________________________________________________
==> REQUEST
POST /graph/v1.0/users
X-Request-ID: collaborativePosix/collaborativePosixFS.feature:67-6
==> REQ BODY
{"onPremisesSamAccountName":"Alice","passwordProfile":{"password":"123456"},"displayName":"Alice Hansen","mail":"[email protected]","accountEnabled":true}
<== RESPONSE
201 Created
X-Xss-Protection: 1; mode=block
<== RES BODY
{"accountEnabled":true,"displayName":"Alice Hansen","id":"651d20f2-e6b4-4ede-a840-40f74d826b5e","mail":"[email protected]","onPremisesSamAccountName":"Alice","surname":"Alice","userType":"Member"}
_______________________________________________________________________
==> REQUEST
GET /graph/v1.0/users/Alice
X-Request-ID: collaborativePosix/collaborativePosixFS.feature:67-6
<== RESPONSE
200 OK
X-Xss-Protection: 1; mode=block
<== RES BODY
{"accountEnabled":true,"displayName":"Alice Hansen","id":"651d20f2-e6b4-4ede-a840-40f74d826b5e","onPremisesSamAccountName":"Alice","signInActivity":{"lastSuccessfulSignInDateTime":"2025-11-04T15:01:27Z"},"surname":"Alice","userType":"Member"}
### And user "Alice" has created folder "/firstFolder"
_______________________________________________________________________
==> REQUEST
MKCOL /remote.php/dav/files/Alice/firstFolder
X-Request-ID: collaborativePosix/collaborativePosixFS.feature:67-7
<== RESPONSE
201 Created
X-Xss-Protection: 1; mode=block
### Given user "Alice" has uploaded file with content "content" to "test.txt"
_______________________________________________________________________
==> REQUEST
PUT /remote.php/dav/files/Alice/test.txt
X-Request-ID: collaborativePosix/collaborativePosixFS.feature:67-68
==> REQ BODY
content
<== RESPONSE
201 Created
X-Xss-Protection: 1; mode=block
### When the administrator copies the file "test.txt" to the folder "firstFolder" for user "Alice" on the POSIX filesystem
### Then the command should be successful
### And the content of file "/firstFolder/test.txt" for user "Alice" should be "content"
_______________________________________________________________________
==> REQUEST
GET /remote.php/dav/files/Alice/firstFolder/test.txt
X-Request-ID: collaborativePosix/collaborativePosixFS.feature:67-71
<== RESPONSE
200 OK
X-Xss-Protection: 1; mode=block