TrueNAS / NFS / LXC / Nextcloud Permission Issue Notes¶
Problem¶
A TrueNAS SCALE NFS share containing an Obsidian vault was mounted on a Linux desktop.
Symptoms¶
- File manager could duplicate files successfully.
- Terminal
cpworked. - Obsidian could create and edit notes.
- Obsidian could not duplicate files.
Obsidian error:¶
Uncaught (in promise) Error: EPERM: operation not permitted, copyfile
'/home/james/Projects/Notes/Noteforge/Meeting.md'
->
'/home/james/Projects/Notes/Noteforge/Meeting 1.md'
Additional symptoms:¶
- Some Samba operations failed with permission errors.
- Some container writes behaved inconsistently.
- Recursive chmod operations failed with:
Technologies involved¶
TrueNAS SCALE¶
Storage backend: - ZFS dataset - Native NFSv4 ACLs Relevant ZFS properties:
NFS¶
Linux client mount:
Mounted using normal UID/GID mapping:Proxmox LXC containers¶
Containers were unprivileged. Example:
This caused files created by Nextcloud to appear on TrueNAS as: rather than: This is expected behaviour for unprivileged containers.Nextcloud¶
Nextcloud was intentionally sharing the same dataset. Workflow:
Therefore separating Nextcloud data into another dataset was not appropriate.Diagnosis commands¶
Check NFS mount¶
Linux client:
Showed:Check filesystem type¶
Confirmed:Check ownership¶
TrueNAS:
Example: and Nextcloud-created files showed: because of LXC UID remapping.Check ZFS ACL configuration¶
TrueNAS:
Important output:Inspect real NFSv4 ACLs¶
getfacl was misleading because it only showed the POSIX view.
Use:
Root cause¶
The issue was:
With NFSv4 ACLs enabled, ZFS was preventing metadata-changing operations that conflicted with the ACL. Operations affected: - Node.jsfs.copyFile() used by Obsidian
- chmod operations
- some Samba metadata operations
- some container file operations
Normal writes still worked, which made the problem confusing.
Fix¶
Changed the ZFS dataset ACL mode:
zfs set aclmode=passthrough Jiggerbights/projects
zfs set aclinherit=passthrough Jiggerbights/projects
Resulting ACL example¶
Working file:
owner: 1001
group: 3001
mode: 777
trivial_acl: true
owner@:rwxp--aARWcCos:allow
group@:rwxp--a-R-c--s:allow
everyone@:rwxp--a-R-c--s:allow
Future troubleshooting checklist¶
If similar issues occur: 1. Check whether it is a metadata problem, not a write problem. Test:
2. Check ZFS ACL settings: 3. If using mixed Linux/NFS/container environments, prefer: 4. Inspect actual NFSv4 ACLs: 5. Remember LXC UID mapping: 6. Avoid recursive chmod/chown until the ACL model is understood. They can make a working ACL tree worse.