diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index e64e67f0..d248902e 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -1589,10 +1589,10 @@ static int ntfs_fuse_utimens(struct SECURITY_CONTEXT *scx, fuse_ino_t ino, /* no check or update if both UTIME_OMIT */ if (to_set & (FUSE_SET_ATTR_ATIME + FUSE_SET_ATTR_MTIME)) { #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) - if (ntfs_allowed_access(scx, ni, S_IWRITE) + if (ntfs_allowed_as_owner(scx, ni) || ((to_set & FUSE_SET_ATTR_ATIME_NOW) && (to_set & FUSE_SET_ATTR_MTIME_NOW) - && ntfs_allowed_as_owner(scx, ni))) { + && ntfs_allowed_access(scx, ni, S_IWRITE))) { #endif ntfs_time_update_flags mask = NTFS_UPDATE_CTIME; diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index a4d1afe2..84ac8513 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -2248,10 +2248,10 @@ static int ntfs_fuse_utimens(const char *path, const struct timespec tv[2]) /* no check or update if both UTIME_OMIT */ if ((tv[0].tv_nsec != UTIME_OMIT) || (tv[1].tv_nsec != UTIME_OMIT)) { #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) - if (ntfs_allowed_access(&security, ni, S_IWRITE) + if (ntfs_allowed_as_owner(&security, ni) || ((tv[0].tv_nsec == UTIME_NOW) && (tv[0].tv_nsec == UTIME_NOW) - && ntfs_allowed_as_owner(&security, ni))) { + && ntfs_allowed_access(&security, ni, S_IWRITE))) { #endif ntfs_time_update_flags mask = NTFS_UPDATE_CTIME;