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

Original Date/Time is changed when Copy / View #17

Open
TTT7275 opened this issue Mar 4, 2023 · 17 comments
Open

Original Date/Time is changed when Copy / View #17

TTT7275 opened this issue Mar 4, 2023 · 17 comments

Comments

@TTT7275
Copy link

TTT7275 commented Mar 4, 2023

Thanks for create this great module,

I have a problem with Original Date/Time is changed when Copy / Viewing. I created an issue in Cryptomator also ->
cryptomator/cryptomator#2700

Here is what I got :

When Copy

  • Cryptomator - Some file do change the date/time some file do not. I still can't find the pattern since both files have the same pattern except it has different date time value in the file.
  • rclone - All the files keep the original date/time

When Preview in Finder according to julesallen

  • Both rclone and Cryptomator do change date/time to current date time.
@macos-fuse-t
Copy link
Owner

Unfortunately this is a bug of macOS that causes Preview to change file modification time (mtime) on an NFS volume

@TTT7275
Copy link
Author

TTT7275 commented Mar 4, 2023

Then, we can only wait and hope they will fix it.

Thank you for your quick reply.

@julesallen
Copy link

Hey Alex @macos-fuse-t , thank you for all the work you've put in on getting the project this far. kexts are a pia!

Unfortunately this is a bug of macOS that causes Preview to change file modification time (mtime) on an NFS volume

I'm not a filesystem developer and don't know where to dig to help get this fixed. You say it's a bug in macOS, is the core OS using an old or buggy version of NFS? Has this been reported to Apple and is the core of the NFS open source?

Looks like we're not alone here! https://apple.stackexchange.com/questions/452957/mac-quick-preview-change-file-datetime-in-nfs-shares

Happy to do some grunt work to help get this solved if you need the help.

@macos-fuse-t
Copy link
Owner

I will report this bug although I'm pretty sure it was already reported in the past
Perhaps this is the culprit: nfs_vattr_set_bitmap() func:
https://opensource.apple.com/source/xnu/xnu-7195.60.75/bsd/nfs/nfs4_subs.c.auto.html

@macos-fuse-t
Copy link
Owner

A workaround is available in 1.0.22

@kapitainsky
Copy link

It is great news that nomtime and noatime has been added!

For completeness could you also add nodiratime at some stage? It would solve the same problem for directories.

@macos-fuse-t
Copy link
Owner

nomtime and noatime apply both to files and folders

@kapitainsky
Copy link

kapitainsky commented Jul 1, 2023

I have just tested and it does not seem to be the case - here is some folder and file on FUSE-T share:

image

I copy it to other location on share drive (before mtime of file would also change - but this is now working)

image

I copy it to local disk:

image

@macos-fuse-t
Copy link
Owner

How did you test?

@kapitainsky
Copy link

Also some reference to other project findings when dealing with NFS on macOS

https://github.com/me-io/docker-machine-mac-nfs-mount/blob/master/README.md

@kapitainsky
Copy link

kapitainsky commented Jul 1, 2023

How did you test?

fuse-t with -o noatime and then I simply use finder copy/paste. This option made file mtime not to change anymore - which is great.

@macos-fuse-t
Copy link
Owner

You should use with -o nomtime. noatime is for access time

@macos-fuse-t
Copy link
Owner

Try with a libfuse sample fusexmp_fh which would mirror your hard disk.

@kapitainsky
Copy link

kapitainsky commented Jul 1, 2023

You should use with -o nomtime. noatime is for access time

Yes - but this is exactly what I want - to have mtime and prevent its changes by software like Finder trying to change atime.

Actually I think this is the most common case - people usually do not care about atime and want mtime to be accurate.

@macos-fuse-t
Copy link
Owner

Correct, that's why you should mount with "-o nomtime". It won't change modify time when hitting Preview. Access time would still get updated.

@kapitainsky
Copy link

kapitainsky commented Jul 1, 2023

Yes it wont change - ever:) I want to know when I edited my file... But yes I do understand that people might have different requirement so great we have both options available.

With -o noatime Finder and Preview are behaving like they should - not changing mtime - I guess because they can not modify atime no damage to mtime is done.

@macos-fuse-t
Copy link
Owner

Use experimental "-o backend=smb" which doesn't have this issue. I don't know what Mountain Duck is or how it works.
See here https://github.com/macos-fuse-t/fuse-t/releases/tag/1.0.35

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

No branches or pull requests

4 participants