Mudslinger
Cadet
- Joined
- Jun 4, 2016
- Messages
- 4
I have been working on my media server the last couple of days but i can't seem to wrap my head around the permissions. For some reason, i don't have permission to write.
I have been running freenas for several years now (current build: FreeNAS-11.1-U7), it has 2 users, my personal account and a 'plex' account and a group called 'thuisgroep'. Both users are part of this group.
The dataset has the PERMISSION_TYPE "windows". Most computers are windows based, with some a few unix based systems. the OWNER and GROUP have read, write and execute permissions. And i'm sharing it via the SMB protocol.
In Windows i have no trouble accessing the share nor do i have issues with permissions. Everything works, i can add, remove, change, create etc.
The mediaserver runs on Ubuntu Server 18.04 which runs things like Plex. So adding the share to my mediaserver is required for plex to see all the content. For now its a fresh install, doesn't have a firewall enabled. The only things installed are updates, ssh, cifs-utils and docker.
I had a previous server running ubuntu 16.04 on which everything worked, so i simply copied the entries in
This is one of the entries:
All i needed to do was to make sure the UID and GID on ubuntu matches those on freenas. (and ofcourse create the directory in /mnt and give it permissions).
Once i matched those, i mounted to share with
I can mount the share without a hitch, i can mount it with both my own account as well as 'plex'. the problem i have is that the permissions in Ubuntu look like this:
As you probably can guess, i don't have any permissions to read or write in it, as only ROOT can.
To give you a perspective on how the permissions are on Freenas:
these are the permission on the directory when the share is not mounted:
I did some searching on the internet and what others are referring to is to add the UID and GID in the options of the Cifs share. So i added that as follow:
now the permissions "look" correct:
at least the owners look correct, the permissions themselves, don't. However, i can write to the directory as user 'plex' (i mean, if i login to ubuntu as plex, i can write files in that share). Which makes sense as PLEX is the owner.
But my personal account cant write in it. Which, from the last permissions listed, makes sense too because 'thuisgroep' only has read permissions. But according to freenas, the group 'thuisgroep' should have write permissions as well.
It seems like freenas is not providing the permissions information to ubuntu for some strange reason? When i was running ubuntu 16.04, my freenas version was 9.x (can't recall exactly which version, sorry). I didn't need to specify UID or GID nor did i need to add file_mode or dir_mode to the cifs share options.
The biggest issue i have is that the permissions in ubuntu don't match those of freenas. I can overwrite that in ubuntu (with file_mode and dir_mode) but it doesn't change anything on Freenas'-side. it's more of a visual-correction than the real permissions.
what am i doing wrong? How can ubuntu see the permissions that are specified in freenas? (or what changed since freenas 9.x that it wont work anymore).
I have been running freenas for several years now (current build: FreeNAS-11.1-U7), it has 2 users, my personal account and a 'plex' account and a group called 'thuisgroep'. Both users are part of this group.
The dataset has the PERMISSION_TYPE "windows". Most computers are windows based, with some a few unix based systems. the OWNER and GROUP have read, write and execute permissions. And i'm sharing it via the SMB protocol.
In Windows i have no trouble accessing the share nor do i have issues with permissions. Everything works, i can add, remove, change, create etc.
The mediaserver runs on Ubuntu Server 18.04 which runs things like Plex. So adding the share to my mediaserver is required for plex to see all the content. For now its a fresh install, doesn't have a firewall enabled. The only things installed are updates, ssh, cifs-utils and docker.
I had a previous server running ubuntu 16.04 on which everything worked, so i simply copied the entries in
/etc/fstab
.This is one of the entries:
//192.168.1.100/storage/music /mnt/Music/ cifs iocharset=utf8,credentials=/home/user/.smbcredentials,sec=ntlmssp 0 0
All i needed to do was to make sure the UID and GID on ubuntu matches those on freenas. (and ofcourse create the directory in /mnt and give it permissions).
Once i matched those, i mounted to share with
sudo mount -a
and the share is mounted.I can mount the share without a hitch, i can mount it with both my own account as well as 'plex'. the problem i have is that the permissions in Ubuntu look like this:
Code:
drwxrwxr-x 3 775 root 4096 Jun 8 16:59 ./ drwxr-xr-x 23 root root 4096 Jun 8 16:22 ../ drwxr-xr-x 2 root root 0 Jun 9 10:41 test/
As you probably can guess, i don't have any permissions to read or write in it, as only ROOT can.
To give you a perspective on how the permissions are on Freenas:
Code:
drwxrwx---+ 3 plex thuisgroep 7 Jun 9 10:41 Test/
these are the permission on the directory when the share is not mounted:
Code:
drwxrwxr-x 2 plex thuisgroep 4096 Jun 8 16:59 test/
I did some searching on the internet and what others are referring to is to add the UID and GID in the options of the Cifs share. So i added that as follow:
//192.168.1.100/storage/music /mnt/Music/ cifs iocharset=utf8,credentials=/home/user/.smbcredentials,uid=1002,gid=1001,sec=ntlmssp 0 0
now the permissions "look" correct:
Code:
drwxr-xr-x 2 plex thuisgroep 0 Jun 9 10:41 test/
at least the owners look correct, the permissions themselves, don't. However, i can write to the directory as user 'plex' (i mean, if i login to ubuntu as plex, i can write files in that share). Which makes sense as PLEX is the owner.
But my personal account cant write in it. Which, from the last permissions listed, makes sense too because 'thuisgroep' only has read permissions. But according to freenas, the group 'thuisgroep' should have write permissions as well.
It seems like freenas is not providing the permissions information to ubuntu for some strange reason? When i was running ubuntu 16.04, my freenas version was 9.x (can't recall exactly which version, sorry). I didn't need to specify UID or GID nor did i need to add file_mode or dir_mode to the cifs share options.
The biggest issue i have is that the permissions in ubuntu don't match those of freenas. I can overwrite that in ubuntu (with file_mode and dir_mode) but it doesn't change anything on Freenas'-side. it's more of a visual-correction than the real permissions.
what am i doing wrong? How can ubuntu see the permissions that are specified in freenas? (or what changed since freenas 9.x that it wont work anymore).