Files with strange names/extensions (lots of .~)

Can someone tell me what are these files and what purpose they serve? I can see a lot of these in my Activity tab.


Can you please tell us a little bit more about your environment, the used software version and if you’ve enable e.g. e2e encryption and explain IN DETAIL what you did as the activities have been logged.

Well, i’m in a multi user env, so these are activities from others. I can’t tell in DETAIL what they have done…

  • NC 20
  • PHP 7.4
  • MariaDB 10.3
  • Redis as memcache (locking and local)
  • Server Encryption enabled
  • E2E not enabled

Here is also log lines from Apache access log:

"GET /remote.php/dav/files/users/Share%20Copies/NIER%20-%2035%20-%20Si%C3%A8ge/...........CV%20Mr%20Ould%20Mr.pdf.~5a5c.~4074.~7044.~21dd.~526f.~2c19.~2fbe.~6f94.~10c.~20b4.~40c4 HTTP/1.1" 200 1655 "-" "Mozilla/5.0 (Windows) mirall/3.2.1stable-Win64 (build 20210428) (Nextcloud, windows-10.0.19043 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

I can also display those files when selecting “Show hidden files” inside any folder, but I stil don’t know how/why these are created neither how to avoid it

You wrote that you’ve enabled encryption. It might be possible that these are encrypted files. If these files are all referring to the same original file but with different releases it might also be possible that they’re created due to a file versioning mechanism.

Hum. I have this setting in config.php

'trashbin_retention_obligation' => 'auto, 7',
'versions_retention_obligation' => 'auto, 7',

And i have those strange/hidden files much older than 7 days, others only have hours.
And my versions tab for each file seems correct…no more than 7 days older.

Another hint for this serious problem: 724290 files starting wit a dot on data folder.

# find . -name ".*" | wc -l

:worried: :tired_face:

It looks like those are all excel files?

Microsoft Office actually creates those .~ files as part of the auto-save function. Depending on the office version they have a little bit different formats, but if you open a word document, edit something and open the windows explorer (with “show hidden items” turned on), you should see that too:

Do you use the nextcloud desktop client? and if yes, which os (i don’t know if office for mac creates .xxx files as linux does for hidden files)?

Thanks @philipprogramm

I have mixed users using both Windows and MacOS. But in your exemple they look like ~$ and not .~.

I also have PDF files, but yes, lots of DOCX and XLSX too.

jep, not sure whether Office on macOS may use .~ as auto-save files, because it’s based on unix.
(in linux .whatever files are not shown in gui file explorers)

i don’t use macOS, but you could just try that out by creating a word file, edit something, don’t save and check the folder with terminal for .~ files.

you could then add a rule which doesn’t sync those .~ files (maybe with the malware protection of nextcloud?)

Ok i’ll ask a Mac user to do it. Thanks :+1: