Chmod Operation not permitted on imported ZFS

andypm1982

New Member
Feb 19, 2023
12
2
1
After moving from truenas to proxmox after my truenas OS drive died i am having issues chmodding the imported zfs pool.

the current permissions on the pool data are drwx--x--- which i think is stopping my plex lxc from reading the media even though its a privileged container.

When i try to chmod any of the directories inside the zfs pool i get operation not permitted. I assume this id down to ACL possibly as thats what truenas was using for sharing.

Does anyone know how to clean off any existing permissions so i can set 775 to my media storage?

Thanks.
 
I solved this. Eventually found out the files/folders i could not chmod had inherited ACL's from the truenas samba shares. Once i stripped the acls i was able to change permissions on everything and my media showed up immediately in plex.
 
How did you remove the acls?

Things i've tried:

Bash:
apt install -y acl

setfacl -bR /tank

zfs set acltype=off tank

After reboot:

Bash:
root@pve01:~# zfs get acltype
NAME                                                   PROPERTY  VALUE     SOURCE
tank                                                   acltype   off       local
tank/.system                                           acltype   off       local
tank/.system/configs-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  acltype   off       inherited from tank/.system
tank/.system/cores                                     acltype   off       inherited from tank/.system
tank/.system/netdata-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  acltype   off       inherited from tank/.system
tank/.system/samba4                                    acltype   off       inherited from tank/.system
tank/media                                             acltype   off       local
 
Last edited:
Okay, I managed to get the pool working again on truenas and exported it correctly there. So now my status is looking like this:

Code:
root@pve01:~# zfs get acltype
NAME            PROPERTY  VALUE     SOURCE
tank            acltype   off       local
tank/media      acltype   off       local

Then I changed the ownership:

Bash:
chown -R root:root /tank/

But if I want to change permissions I get this errors:
Code:
chmod: changing permissions of '/tank/<filename>': Operation not permitted

Any ideas?
 
Last edited:
Well, I managed to fix it.

Bash:
# I found a restricted aclmode on my dataset
zfs get aclmode
NAME            PROPERTY  VALUE        SOURCE
tank            aclmode   discard      local
tank/media      aclmode   restricted   local

# Set aclmode to discard
zfs set aclmode=discard tank/media

# After this I finally can chmod without errors
chmod -R 755 /tank/
 
  • Like
Reactions: darthRudolph