SMB Permissions won't allow chmod, is there a work around?

dealy663

Dabbler
Joined
Dec 4, 2021
Messages
32
I've been working with Scale TrueNAS-SCALE-22.02-RC.2 for a few weeks now and generally like what I'm seeing. I've been slowly migrating data over to this new machine and OS.

I've run into a snag I can't figure out. I have a couple of disks whose content I wanted to move over to a dataset on truenas.Using the Finder on the Mac to send terabytes of data over to truenas had some issues. So I dropped into a terminal and issued $> mv disk1/dirname/* /Volumes/truenas/smbshare/disk1/dirname

This copies over the files apparently but then errors out when trying to set the permissions on the files with the following:
mv: /Volumes/permTest/org/org-roam/20220110180530-offsite.org: fchmod failed: Permission denied

This of course borks the mv command and nothing is deleted on disk1. I've tried everything I could think of in the UI to set appropriate permissions with both ACLs and then reverting back to standard unix permissions. Nothing worked. Finally I just set everyone to full control on both the dataset and the smb share and it still won't allow me to move files as I expected to.

It sounds like this is specificaly disabled, but I don't quite get why that would be the case. If this is indeed intentional, is there some other way of setting permissions or handling the moving of files to smb shares on truenas? Is the expectation that people won't want to move files and be able to preserve permissions on the filesystem share?

Thanks, for any help or useful explanations.

Derek
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
This is a protection mechanism to prevent chmod from altering ACLs in an unexpected way. You can disable by setting the ZFS aclmode property to passthrough.
 

dealy663

Dabbler
Joined
Dec 4, 2021
Messages
32
ok, I guess that makes sense, regarding the ACLs.

This leaves me wondering if I'm behind the times here with file management and permissions. Is there some more "normal" way of allowing users to interact with SMB shares? Is the concept of setting specific permissions on remote files kinda frowned upon nowadays?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
ok, I guess that makes sense, regarding the ACLs.

This leaves me wondering if I'm behind the times here with file management and permissions. Is there some more "normal" way of allowing users to interact with SMB shares? Is the concept of setting specific permissions on remote files kinda frowned upon nowadays?

It depends on what you want to do. Users can alter ACLs through the SMB protocol. Letting users SSH into a server and run local commands is probably not a great idea in general. I think most admins in larger environments _don't_ want users touching permissions though.
 

TheMunk

Cadet
Joined
Jun 10, 2017
Messages
8
This is a protection mechanism to prevent chmod from altering ACLs in an unexpected way. You can disable by setting the ZFS aclmode property to passthrough.
How does one set the ZFS aclmode to passthrough?
 
Top