diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index addd6808ca3..67b544d4dee 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -698,7 +698,7 @@ NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs, status = pvfs_resolve_parent(pvfs, req, name, &parent); NT_STATUS_NOT_OK_RETURN(status); - if (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { + if (container) { parent_mask = SEC_DIR_ADD_SUBDIR; } else { parent_mask = SEC_DIR_ADD_FILE;