Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last modified timestamp not preserved for SMB stored vaults #3301

Closed
2 tasks done
infeo opened this issue Jan 29, 2024 · 4 comments
Closed
2 tasks done

Last modified timestamp not preserved for SMB stored vaults #3301

infeo opened this issue Jan 29, 2024 · 4 comments

Comments

@infeo
Copy link
Member

infeo commented Jan 29, 2024

Please agree to the following

Summary

The last modified timestamp of a file gets lost, when it is copied into an unlocked vault. The vault storage location is accessible over a SMB share.

What software is involved?

  • Operating System: Windows 11 / Windows 10
  • Cryptomator: 1.11.1

Volume Type

WinFsp

Steps to Reproduce

  1. Unlock vault
  2. Copy file from outside the vault into the vault

Expected Behavior

Last modified timestamp is preserved.

Actual Behavior

Last modified timestamp is set to current time.

Reproducibility

Always

Relevant Log Output

No response

Anything else?

No response

@infeo
Copy link
Member Author

infeo commented Jan 29, 2024

This must be a bug in cryptomator/cryptofs.

Using mirror example from cryptoamtor/fuse-nio-adapter without the cryptographic layer, the lastModified timestamp is preserved.

@infeo
Copy link
Member Author

infeo commented Jan 29, 2024

Adjusted log of the fuse-nio-adapter test with the cryptographic layer:

The service java has been started.
10:12:26.973 [main] INFO org.cryptomator.frontend.fuse.mount.MirroringFuseMountTest - Mounted successfully to: file:///Y:/
10:12:26.973 [main] INFO org.cryptomator.frontend.fuse.mount.MirroringFuseMountTest - Enter anything to unmount...
10:12:40.327 [Thread-3] DEBUG org.cryptomator.cryptolib.common.ReseedingSecureRandom - Seeding CSPRNG with 55 bytes...
10:12:40.327 [Thread-3] DEBUG org.cryptomator.cryptolib.common.ReseedingSecureRandom - Seeded CSPRNG.
10:12:40.335 [Thread-3] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3329593Z, lastAccessTime: 2024-01-29T18:12:40.3386397Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
10:12:40.337 [Thread-3] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3329593Z, lastAccessTime: 2024-01-29T18:12:40.3379665Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
10:12:40.342 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3329593Z, lastAccessTime: 2024-01-29T18:12:40.3429961Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
10:12:40.346 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3329593Z, lastAccessTime: 2024-01-29T18:12:40.3469914Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
10:12:40.359 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3559672Z, lastAccessTime: 2024-01-29T18:12:40.3595218Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:40.366 [Thread-3] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3615267Z, lastAccessTime: 2024-01-29T18:12:40.3665286Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:40.367 [Thread-3] DEBUG org.cryptomator.frontend.fuse.ReadWriteAdapter - utimens /foobar.zip (last modification 2024-01-26T09:18:56.709065400Z, last access 2024-01-29T18:12:40.366528600Z)
10:12:40.377 [Thread-3] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-26T09:18:56.7090654Z, lastAccessTime: 2024-01-29T18:12:40.3776764Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:40.378 [Thread-3] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - release /foobar.zip (1)
10:12:40.409 [Thread-1] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3920272Z, lastAccessTime: 2024-01-29T18:12:40.3920272Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:40.801 [Thread-4] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3920272Z, lastAccessTime: 2024-01-29T18:12:40.3920272Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:41.338 [Thread-2] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3920272Z, lastAccessTime: 2024-01-29T18:12:40.3920272Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:41.340 [Thread-2] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3920272Z, lastAccessTime: 2024-01-29T18:12:40.3920272Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:41.349 [Thread-2] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - release /foobar.zip (2)
10:12:41.384 [Thread-2] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3920272Z, lastAccessTime: 2024-01-29T18:12:41.3493213Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:41.385 [Thread-2] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /foobar.zip (lastModifiedTime: 2024-01-29T18:12:40.3920272Z, lastAccessTime: 2024-01-29T18:12:41.3493213Z, creationTime: 2024-01-29T18:12:40.3278555Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 81981, fileKey: null)
10:12:41.389 [Thread-2] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - release /foobar.zip (3)

Seems like, that after/while closing the file channel, the lastModified time is updated.

@infeo
Copy link
Member Author

infeo commented Jan 31, 2024

Depends on cryptomator/cryptofs#205.

@infeo infeo modified the milestones: 1.12.0, 1.12.1, next Feb 6, 2024
@infeo
Copy link
Member Author

infeo commented Feb 19, 2024

Fixed with c527808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant