Transform directory to dataset while preserving share permissions

scurrier

Patron
Joined
Jan 2, 2014
Messages
297
firstvol/media/Recordings
(firstvol and media are datasets, Recordings is not but I want it to be)

I want to transform my Recordings directory to be a dataset instead of a directory so that I can snapshot and replicate it independently of the other things in my media dataset. The media directory/dataset is SMB shared, though, with layered permissions that I painstakingly set up and that I'm afraid of breaking. How can I transform Recordings from a directory into a dataset? Is it as simple as temporarily renaming Recordings, creating a dataset named "Recordings" in its place with matching settings (below), and then relocating the contents with cp -a or mv? Is there a good way to copy the ACL's on Recordings to the new dataset?

For completeness, here are the settings I currently have at the media level.
Storage > Pools > Dataset Options
Share Type = Windows

Storage > Pools > Permissions
ACL Type = Windows

Sharing > SMB > Edit
Browsable to Network Clients = Yes
Allow Guest Access = Yes
VFS Objects = streams_xattr, zfs_space, zfsacl
 

scurrier

Patron
Joined
Jan 2, 2014
Messages
297
Echo!

Who wants to see me take chances with my wife's "The Bachelor" recordings, under risk of death?
 
Joined
Jan 4, 2014
Messages
1,644
Is firstvol the name of the pool? Do you want Recordings to be a child dataset of media?

with layered permissions that I painstakingly set up and that I'm afraid of breaking
More detail required here please.
 

scurrier

Patron
Joined
Jan 2, 2014
Messages
297
Thanks for your response.

Indeed, you're correct on both counts. firstvol is the name of the pool. I want Recordings to be a child dataset of media.

The "layered permissions" I can't remember much detail on, to be honest. They would probably be simple to someone who's skilled with permissions. They involved some inheritance but with some explicit ACE's on one contained directory. I set them via Windows mostly but may have also used setfacl. Sorry I can't provide more detail.
 
Joined
Jan 4, 2014
Messages
1,644
Let's approach this another way. Who do you want to have access to what, and what type of access? e.g. along the lines of Person/Group X has read/write/full/no access to data Y.
 

scurrier

Patron
Joined
Jan 2, 2014
Messages
297
It's something like this. I want a user fred to have read and write access to everything below Recordings and everyone else to have no access. But then I want a user plex to have read access on one special directory a few layers deep in the hierarchy.

But is this relevant if I just want to carry over the permissions that I already have?
 
Joined
Jan 4, 2014
Messages
1,644
But is this relevant if I just want to carry over the permissions that I already have?
I'm not sure yet. Structurally, you are trying to change things moving from a directory to a dataset.

I want a user Plex to have read access on one special directory a few layers deep in the hierarchy.
The picture is still a little unclear. Let me get this right.
Plex does not have access to media, just to an area deep in Recordings?
Who is the owner of the data in media? Is it Fred?

Who wants to see me take chances with my wife's "The Bachelor" recordings, under risk of death?
Are these in the area in Recordings that you want Plex to have access to? Are the Bachelor recordings manually placed there?
 
Last edited:

scurrier

Patron
Joined
Jan 2, 2014
Messages
297
Whoa, why did my post #6 get modified to include the "iX affliate" garbage? Modifying what people said ain't cool iX Systems!

Mr. Butt, I am confusing you with the user names and my Bachelor comment. Apologies. I am actually trying to do multiple things here but ask a single question that I thought would solve both of them. That is backfiring because you're doing too good of a job answering the question.

If you want a real concrete permissions situation to solve, then here it is: I want plex to have r/w from Recordings on down, and everyone else to just have read access, including guests. I think I want this to inherit down from Recordings because plex will be creating new files there.
 
Joined
Jan 4, 2014
Messages
1,644
Now, we're getting somewhere. The solution is a lot simpler than you might be believing. I'm guessing that you have a Plex DVR writing to the Recordings area.

Logically, who is the owner of Recordings? Is it the same as the owner of Media?

and everyone else to just have read access
Really? What about... you (admin)?

and everyone else to just have read access, including guests
Apart from admin and Plex, does everyone else access recordings solely via Plex? Or will they need access via the SMB share as well? If the latter, is that just users who have an account on the FreeNAS server, or everyone?

That is backfiring because you're doing too good of a job answering the question
Yes, it will backfire if ownership and permissions are not fully considered.


Back online in a few hours.
 
Last edited:
Top