SOLVED Move folder from jail to dataset while preserving permissions

Status
Not open for further replies.

Scentle5S

Explorer
Joined
Sep 9, 2016
Messages
74
Hi,

After reading this comment I decided to move the metadata folder of my Plex plugin (49.2GB at this moment) from the jail to a dedicated dataset outside the jail. This allows easy jail reinstallation in case of a plugin issue, which actually happened by the way, but that's another story.

The problem is that I want to move the metadata folder as it is, while keeping informations such as the owner, the group, the permissions, and timestamps of every single folder and file, because I don't know how Plex organizes its metadata and don't want to mess it with foolish differences like timestamps.

So I planned on using rsync like this :

sudo rsync -ha "/mnt/Storage/jails/plexmediaserver_1/var/db/plexdata/Plex Media Server" "/mnt/Storage/Plex"

But everytime I get errors like these :

rsync: failed to set permissions on "/mnt/Storage/Plex/some_path": Operation not permitted (1)
rsync: mkstemp "/mnt/Storage/Plex/some_path" failed: Operation not permitted (1)


According to what I found here, this is due to the fact that the user running the rsync command (root I believe since I used sudo) can't write the permissions and stuff to the copied files. I tried without sudo and got the same result. I even tried this :

sudo -u plex rsync -ha "/mnt/Storage/jails/plexmediaserver_1/var/db/plexdata/Plex Media Server" "/mnt/Storage/Plex"

Thinking it would then be the owner of the files itself who executes the command, but it didn't work either. By the way I have the same plex user on FreeNAS as on the jail (same UID/GID). Also the destination dataset is owned by the plex user/group.

Any idea on why this is happening and how I could make this work ?
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
failed to set permissions on "/mnt/Storage/Plex/some_path": Operation not permitted (1)
My guess is that the Plex dataset has been configured to have Windows permissions, which use ACLs rather than standard Unix permissions. Put the data on a Unix dataset and you should be fine.
 

Scentle5S

Explorer
Joined
Sep 9, 2016
Messages
74
My guess is that the Plex dataset has been configured to have Windows permissions, which use ACLs rather than standard Unix permissions. Put the data on a Unix dataset and you should be fine.
Awesome ! So simple I didn't even think about it ! Well it's going to take a while but so far so good. Thanks a lot !
 
Status
Not open for further replies.
Top