Plugins unable to get r/w permissions

Status
Not open for further replies.

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
I'm not exactly sure what I'm missing here but I just finished setting up crashplan to backup my files on my server, paid for a plan and I'm only backing up critical files that are NOT replaceable. I was able to created the mount points so the folders are being seen but it seems crashplan doesn't have permissions to access those folder so nothing in the folders are being seen.
I created a crashplan user in the plugin and a user on the NAS and matched the passwords but that is about the extend of my knowledge. I need crashplan to have at least read permissions to all folders no matter what their permissions are set to. I don't want to set everything 777, that's just bad, it's bad enough crashplan needs to be able to read everything.

Question is, how do I setup crashplan with permissions to read everything.

Second question is I'd like Plex to have r/w privileges to my media folder, how do I go about adjusting those permissions as well?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
OK, so still no response because I guess it's no simple task to get such things setup but here's what I've done so far...

I've adjusted folder permissions and have added a user called crashplan and another called plex and have added them to the groups that have access to the appropriate folders.

The big question is how do I get the application in the plugin to run as the users that were created so they use the permissions granted to them?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
I have not as of yet. I've been out of town since I last spent some time researching it but it seems to be a GUID and UID matching issue. I'm still trying to figure out how to identify the GUID (Group ID) of the user and the user that the service is running under within he jails. Once I figure this out I'll match the user to a matching GUID (Group ID) and see if that fixes the problem.

Problems I'm trying to overcome at the moment...
Figuring out the user ID in the jails
Figuring out the Group IDs in the jails
Figuring out what user the service is running under.

Hopefully that makes sense.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
I've managed to get the Plugins to read and write to the mounted folders by creating a user in FreeNAS that matches the UID of the user in the jail or by even creating a group with the same GID as the group the service runs under in the jail. This may mean creating a group and giving it the GID of the group that has access to the files you want access to on FreeNAS.
Basically it's UID and GID matching.
I've managed to get Plex r/w access but I'm having trouble with Crashplan. Crashplan needs access to many different folders with many different permissions and I can't seem to get more than one folder deep before the crashplan jail can't read any files or folders any further.

I know this is a old thread but I thought I'd update it as I still haven't found a full resolution.
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
OK, so still no response because I guess it's no simple task to get such things setup but here's what I've done so far...

I've adjusted folder permissions and have added a user called crashplan and another called plex and have added them to the groups that have access to the appropriate folders.

The big question is how do I get the application in the plugin to run as the users that were created so they use the permissions granted to them?

Not sure about crashplan, but I can help you with Plex.

Plex in my NAS runs as the Plex user. So you just need to grant ownership of the Media directory to the Plex user.

In the jail config, mount the Media share to the Plex jail. Then, inside the jail, if you do a `id plex` for me it shows as uid=972(plex) gid=972(plex) groups=972(plex)
So, now you know the Plex user, so just run `chown -R plex:plex /path/to/Media`

The reason I had you run the id command is because if you look at the directory from the NAS itself, it shows the directory structure as being owned by 972, because the Plex user only is in the Plex jail, not in the FreeNAS OS.
# ls -al Media/
36 drwxr-xrwx 7 972 972 9 Feb 28 11:48 Media/

I do it this way because Plex is what I consider the authoritative owner of my media directory. I also have a SMB share to be able to access it from other machines, and I have the SMB permissions set to grant my personal user access instead of the Plex account.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Yep, exactly what I did but I took it a step further and made a plex user (with it's own password but no home) and a Plex group with the same UID and GID as the jail's UID and GID and made that user the owner and added that user to my media group so not only was it the owner but also part of the group.
Plex has r/w permissions but getting crashplan r/w permissions of all the groups I added it too is a PITA. I tried a few different ways and nothing seems to give it permissions to more than about 1 sub folder in, nothing more. I'm not exactly sure why. But I think at this point I've pretty much given up on Crashplan and am going to focus on making my own backup server and replicating critical non-replaceable files to the backup server and have it on a turn on turn off schedule.
Turn on, run the backup, backup completes, turn off. Saves power and makes it really hard to break into if anyone managed to break into the network.
Ultimately I'd like to be able to backup to friends servers but only targeted critical files so I don't fill up their servers. For that I may need to use rsync, but even that has it's issues, like needing to open a port on the receiving end, encryption, ect.

BTW, I think you made need to "code" the command line you posted, it put in a smiley face.
 
Status
Not open for further replies.
Top