I have my files that are located on my Freenas and Sonarr is running on another machin on Ubuntu.
Sonarr uses the Ubuntu OS to try to select the path for a TV Show, instead of using the user with which the cifs share was mounted. I have successfully mounted a cifs to allow access but I have no idea exactly how it works since the user used for accessing the cifs is different that the Ubuntu user used by Sonarr.
Should I create a user on Freenas with the same exact name than the Ubuntu user? Pretty sure that won’t do the trick but never now…
I did create a user on Freenas that has permissions on the share //myip/media
When I try to pick the directory, Sonarr tells me that my Ubuntu OS user does not have the rights to write on the directory, so I guess it’s using the user I’m connected with.
I’m now doing the mount manually because I haven’t found how to correctly put the mount in /etc/fstab in order for the system to mount it automatically.
I’m pretty sure that’s a matter of adding my Ubuntu OS user to the directoy but can I do it directly in Ubunutu on the network drive or should I create a user in Freenas with the same name and the same ID as my Ubuntu user?
Went to try again and look for more details, and this is the error message that is showing:
Folder is not writable by user i
So I went looking for the permissions on the mount point:
i@myPc:~$ ls -l
total 25000
drwxrwxr-x+ 13 root 1006 0 Sep 22 00:10 windowsshare
So I logged in Freenas and created a user ‘i’ with the same ID as my user in the Ubuntu system (User ID 1000), added it to the group that has permissions on FreeNas (Group ID 1006), and mounted the drive using the Freenas user with the same name as the one Sonarr is connecting with:
sudo mount -t cifs //myserver/media/ /home/v/windowsshare/ -o username=i,password=mypass,iocharset=utf8,file_mode=0777,dir_mode=0777,sec=ntlmssp
but still not working. I also made it owner of the share but still not working :’(
Can’t figure out how to set this up. Any help is appreciated, thanks a lot
[edit] I tried to create a file on this directory just to see if you would get any error, and I was able to create a file:
i@myPC:~/windowsshare$ ls -l
total 60
-rwxrwxr-x+ 1 i 1006 0 Sep 26 23:12 test
Now I’m even more confused on how to solve this issue
[edit 2] For some reason it worked! But still want to understand why to troubleshoot if I do face the same issue again
With FreeNAS and Ubuntu together I would use NFS instead of CIFS…
Personally I have a FreeNAS too and I run my SAB, Deluge, Sonarr and Radarr in a jail on the same machine. I did too add a user with the same uid and gid as the one I gave permission to my medias folder and I run all those services under that user and it work great.
Also I hope you’re using a incomplete directory that is local to your Ubuntu to avoid a lot of network traffic between FreeNAS and Ubuntu…
I know I’m not bringing a solution to your problem, maybe a new way to try and achieve your goal…
I will check your suggestion on NFS, indeed I wasn’t thinking about that but makes more sense I guess for Ubuntu.
I having a user in Freenas with the same name UID and GID do the trick, my issue is just when I create a folder with another users that can also access the specific folder in the share drive, I can still read it but I’m not able to write anything on that folder. And I think that’s specifically what is the issue here, and I don’t know how to fix that.
I created a group called Media in which I placed all my users… This way if a user create a folder he is gonna be the owner, but the group will have access too.
Did you set the share type to Windows in the storage section? If not that might help, then on your Windows client you can add users and groups to the security.
This guide might help you a little with cifs security of FreeNAS
[edit] after seeing you original post I saw that you did select the Windows share type… The + at the end of the -rwxrwxr-x+ tells exactly that. Maybe you just need to play with the security from your Windows machine…