[Bug]: Server fails on files modified in 1970-01-01
- Dominant language
- C++
- Stars
- 3.9k
- Forks
- 1k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 123
Description
### ⚠️ This issue respects the following points: ⚠️
- [x] This is a **bug**, not a question or a configuration/webserver/proxy issue.
- [x] This issue is **not** already reported on [Github](https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3Abug) OR [Nextcloud Community Forum](https://help.nextcloud.com/) _(I've searched it)_.
- [x] Nextcloud Server **is** up to date. See [Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) for supported versions.
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Bug description
I just ran into nextcloud/desktop#4332 (closed as stale), but on Debian Linux (Version 3.7.3). To me it looks like a server error, at least that's what the client reports.
Files and directories with mtime on 1970-01-01:
```console
$ LC_ALL=C stat misc
File: misc
Size: 160 Blocks: 0 IO Block: 4096 directory
Device: 0,41 Inode: 38735767 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ quazgar) Gid: ( 1000/ quazgar)
Access: 2024-12-03 14:14:48.272056555 +0100
Modify: 1970-01-01 00:00:00.000000000 +0100
Change: 2024-12-03 14:14:48.268056818 +0100
Birth: 2024-12-03 14:14:17.278073007 +0100
```
I get this error in the client:
```
Error transferring https://cloud...../misc - server replied: Not found
```

### Steps to reproduce
1. Create directory with mtime = 1970-01-01T00:00:00
2. Try to sync with server.
### Expected behavior
1. It should sync.
### Nextcloud Server version
29
### Operating system
None
### PHP engine version
None
### Web server
None
### Database engine version
None
### Is this bug present after an update or on a fresh install?
None
### Are you using the Nextcloud Server Encryption module?
None
### What user-backends are you using?
- [ ] Default user-backend _(database)_
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
### Configuration report
```json
```
### List of activated Apps
```shell
```
### Nextcloud Signing status
```shell
```
### Nextcloud Logs
```json
```
### Additional info
I do not know details about the server, it is the one hosted by large German provider Hetzner: https://www.hetzner.com/storage/storage-share
Contributor guide
Assessment
This issue has not been assessed yet.