Permissions for a Sonarr server

Status
Not open for further replies.

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
I have a Sonarr server set up. It's running on a dedicated virtual machine with Ubuntu 16,04. The user in Ubuntu is "mediamgmt".
I have Sonarr set up and running good, but now when i want it to access my shares on my NAS, i get an error message "Folder is not writable by user mediamgmt".

The permissions for my mounted folders is as following:
Code:
mediamgmt@mediamgmt:/media/nas_shares$ ls -l
total 0
drwxrwxr-x+ 7 1001 root 0 May 22 23:32 Media
drwxrwxr-x+ 8 1001 root 0 May 20 20:49 MediaVaggan
drwxrwxr-x+ 6 root root 0 Jun  4 18:23 Torrent

So there is a conflict here, i guess. But i'm not good at all with permissions, so i need some help from you guys to solve this. I want Sonarr to get full access to all the three mounted shares, Media, MediaVaggan, and Torrent. Do i have to change something on my FreeNAS, or is it on my Ubuntu server the changes are needed?
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
bump anyone? :/ i really can't figure out how this should be...
 
D

dlavigne

Guest
What type of share are you using and what are the permissions on the dataset being shared?
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
What type of share are you using and what are the permissions on the dataset being shared?

Thanks for answering! :D Really appreciate the help since i don't know what i'm doing here.

All shares are Windows shares (SMB).

Dataset Media:
Owner (user): Simon (UID 1001)
Owner (group): wheel (GID 0)
Mode: 775
Permission Type: Unix

Dataset MediaVaggan:
Owner (user): Simon (UID 1001)
Owner (group): wheel (GID 0)
Mode: 775
Permission Type: Unix

Dataset Torrent:
Owner (user): root (UID 0)
Owner (group): wheel (GID 0)
Mode: 775
Permission Type: Unix
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
What type of share are you using and what are the permissions on the dataset being shared?

Don't wanna be annoying, but if you know how to help i would really appreciate it. I still haven't figured it out :/ Thanks.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
The user in Ubuntu is "mediamgmt".
Then that user needs to be the owner of, or a member of the group that owns the shared datasets.
Dataset Media:
Owner (user): Simon (UID 1001)
Owner (group): wheel (GID 0)
In this case, mediamgmt would need to be a member of wheel (GID 0), or to be the owner of the dataset, or have the same numeric ID as Simon.
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
Then that user needs to be the owner of, or a member of the group that owns the shared datasets.

In this case, mediamgmt would need to be a member of wheel (GID 0), or to be the owner of the dataset, or have the same numeric ID as Simon.

Thanks for the reply!
I have now created a user in FreeNAS with the name "mediamgmt", UID 1002, and which is a member of the group "wheel".
I restarted Sonarr and tried again, but i still get the same error message: "Folder is not writable by user mediamgmt"
Did i miss something?
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
And how does Sonarr connect to the share?

Hey, sorry for the long delay. I've been on vacation for three weeks and kind of put this on a pause :)
The Virtual Machine (Ubuntu) which is running Sonarr has the shares mounted with fstab.
I am using the username "Simon" to log in to the mounted shares. Should i change this?
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
And how does Sonarr connect to the share?

Hey again. I tried to use the "mediamgmt" credentials instead when mounting the shares. I then restarted everything. Mounting still works fine even with the new credentials, so that's good. In Sonarr, however, it is still the same issue - "Folder is not writable by user mediamgmt". :(
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
What happens if you try to manually write to the folder as that user ( echo blah > blah.txt)?
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
What happens if you try to manually write to the folder as that user ( echo blah > blah.txt)?

I can't do that either :(

Code:
mediamgmt@mediamgmt:~$ echo blah > /media/nas_shares/Media/blah.txt
-bash: /media/nas_shares/Media/blah.txt: Permission denied


EDIT: I also tried mounting the share in my home directory instead, but get the same message then as well.

Code:
mediamgmt@mediamgmt:~$ echo blah > /home/mediamgmt/nas_shares/Media/blah.txt
-bash: /home/mediamgmt/nas_shares/Media/blah.txt: Permission denied
 
Last edited:

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
If you can't write to the folder from the shell as the Sonarr user, then clearly either the ownership or the permissions are wrong. Fixing that is step one. Beyond that, I don't know how else to help. I think I have a pretty good handle on this in *nix, but you're adding Windows sharing to the mix, which I'm pretty weak on.
 
Status
Not open for further replies.
Top