I have an Intel NUC running Kubuntu (based on Ubuntu 18.04.3 LTS \n \l) & Plex server, headless. I used various guidance to set this up. The normal user account to the machine is 'exharris', and the machine name is 'nucserv'.
The Plex media files are all contained on an old external NTFS USB HDD 2TB connected to to the NUC via USB. Because it is NTFS, I have downloaded NTFS-3g.
I have mounted this drive to /media/ntfs. I notice that in terminal, ls shows all files been owned by 'root' (not sure how relevant this fact is)
exharris@nucserv:/media/ntfs$ ls -l
total 92
drwxr-xr-x 1 root root 4096 Sep 14 16:22 Drivers
drwxr-xr-x 1 root root 0 Sep 14 16:35 EBooks
drwxr-xr-x 1 root root 4096 Sep 14 16:39 iTunes
drwxr-xr-x 1 root root 4096 Sep 14 16:41 'July 19 downloads'
drwxr-xr-x 1 root root 4096 Sep 14 16:41 'Mindfulness Skills Vol 1'
drwxr-xr-x 1 root root 4096 Sep 14 16:41 Misc
drwxr-xr-x 1 root root 40960 Sep 28 12:27 Movies
drwxr-xr-x 1 root root 4096 Sep 24 04:29 Music
drwxr-xr-x 1 root root 4096 Sep 14 20:22 'Music Stuff'
drwxr-xr-x 1 root root 4096 Sep 15 19:07 'PC Software'
drwxr-xr-x 1 root root 4096 Sep 14 20:43 Photos
drwxr-xr-x 1 root root 4096 Sep 14 20:59 Porn
drwxr-xr-x 1 root root 0 Sep 14 16:47 '$RECYCLE.BIN'
drwxr-xr-x 1 root root 0 Sep 14 21:09 'Software & ISOs'
drwxr-xr-x 1 root root 0 Sep 20 15:02 'System Volume Information'
drwxr-xr-x 1 root root 12288 Oct 10 23:09 'TV Shows'
I do now know why ls -a reports the user account 'root' twice on each line here, perhaps one is owner and the other is the group, I do not fully understand that. In any case, this is my fstab...
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=5fc20f24-ba33-4e6b-818f-134b4186dc8b / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=CB15-B2F5 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
#line added for ETX-2GB
UUID=B8FCAECDFCAE84EA /media/ntfs ntfs-3g permissions,auto 0 0
samba conf..
[global]
server role = standalone server
map to guest = Bad User
usershare allowguests = yes
hosts allow = 192.168.0.0/16
hosts deny 0.0.0.xsudo 0/0
[NUC-testshare]
comment = test share on NUC box
path = /home/exharris/testshare/
read only = no
guest ok = yes
force create mode = 0775
force user = exharris
force group = exharris
[NUC-EXT2-2TB-Plex]
comment = 2TB Plex Media HDD
path = /media/ntfs
read only = no
guest ok = yes
force create mode = 0775
force user = exharris
force group = exharris
[NUC-testshare] ie /home/exharris/testshare/) works fine and I can read/write to it from other machines on the LAN via Samba
However, although I can view all contents in [NUC-EXT2-2TB-Plex] via Samba from other PCs (even though I have to log in as 'ben'), I cannot write to the folder at all (even on the actual machine SSH logged in).
Also, as user exharris, unless I use sudo, I cannot write to that directory at all
exharris@nucserv:/media/ntfs$ echo "test" > test.txt
-bash: test.txt: Permission denied
exharris@nucserv:/media/ntfs$ sudo echo "test" > test.txt
-bash: test.txt: Permission denied
exharris@nucserv:/media/ntfs$ echo "test" > test.txtecho "test" > test.txtecho "test" > test.txt
exharris@nucserv:/media/ntfs$ echo "test" > test.txt
-bash: test.txt: Permission denied
exharris@nucserv:/media/ntfs$ sudo echo "test" > test.txt
-bash: test.txt: Permission denied
exharris@nucserv:/media/ntfs$ echo "test" > test.txtecho "test" > **test.txtecho "test" > test.txt**
test
Maybe this is to be expected.....
I wanted more control over the Plex media, so I was advised to set up a new Unix user 'ben' an to associate it with a special plex group
**getent passwd**
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:100:102:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nologin
systemd-resolve:x:101:103:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin
syslog:x:102:106::/home/syslog:/usr/sbin/nologin
messagebus:x:103:107::/nonexistent:/usr/sbin/nologin
_apt:x:104:65534::/nonexistent:/usr/sbin/nologin
uuidd:x:105:110::/run/uuidd:/usr/sbin/nologin
avahi-autoipd:x:106:111:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/usr/sbin/nologin
usbmux:x:107:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
dnsmasq:x:108:65534:dnsmasq,,,:/var/lib/misc:/usr/sbin/nologin
rtkit:x:109:114:RealtimeKit,,,:/proc:/usr/sbin/nologin
cups-pk-helper:x:110:116:user for cups-pk-helper service,,,:/home/cups-pk-helper:/usr/sbin/nologin
whoopsie:x:111:117::/nonexistent:/bin/false
kernoops:x:112:65534:Kernel Oops Tracking Daemon,,,:/:/usr/sbin/nologin
saned:x:113:119::/var/lib/saned:/usr/sbin/nologin
pulse:x:114:120:PulseAudio daemon,,,:/var/run/pulse:/usr/sbin/nologin
avahi:x:115:122:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/usr/sbin/nologin
colord:x:116:123:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
hplip:x:117:7:HPLIP system user,,,:/var/run/hplip:/bin/false
mpd:x:118:29::/var/lib/mpd:/usr/sbin/nologin
sddm:x:119:124:Simple Desktop Display Manager:/var/lib/sddm:/bin/false
geoclue:x:120:125::/var/lib/geoclue:/usr/sbin/nologin
exharris:x:1000:1000:exharris,,,:/home/exharris:/bin/bash
plex:x:121:127::/var/lib/plexmediaserver:/bin/bash
sshd:x:122:65534::/run/sshd:/usr/sbin/nologin
ben:x:1001:126::/home/ben:/bin/sh
exharris@nucserv:/media/ntfs$ getent passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:100:102:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nologin
systemd-resolve:x:101:103:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin
syslog:x:102:106::/home/syslog:/usr/sbin/nologin
messagebus:x:103:107::/nonexistent:/usr/sbin/nologin
_apt:x:104:65534::/nonexistent:/usr/sbin/nologin
uuidd:x:105:110::/run/uuidd:/usr/sbin/nologin
avahi-autoipd:x:106:111:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/usr/sbin/nologin
usbmux:x:107:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
dnsmasq:x:108:65534:dnsmasq,,,:/var/lib/misc:/usr/sbin/nologin
rtkit:x:109:114:RealtimeKit,,,:/proc:/usr/sbin/nologin
cups-pk-helper:x:110:116:user for cups-pk-helper service,,,:/home/cups-pk-helper:/usr/sbin/nologin
whoopsie:x:111:117::/nonexistent:/bin/false
kernoops:x:112:65534:Kernel Oops Tracking Daemon,,,:/:/usr/sbin/nologin
saned:x:113:119::/var/lib/saned:/usr/sbin/nologin
pulse:x:114:120:PulseAudio daemon,,,:/var/run/pulse:/usr/sbin/nologin
avahi:x:115:122:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/usr/sbin/nologin
colord:x:116:123:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
hplip:x:117:7:HPLIP system user,,,:/var/run/hplip:/bin/false
mpd:x:118:29::/var/lib/mpd:/usr/sbin/nologin
sddm:x:119:124:Simple Desktop Display Manager:/var/lib/sddm:/bin/false
geoclue:x:120:125::/var/lib/geoclue:/usr/sbin/nologin
exharris:x:1000:1000:exharris,,,:/home/exharris:/bin/bash
plex:x:121:127::/var/lib/plexmediaserver:/bin/bash
sshd:x:122:65534::/run/sshd:/usr/sbin/nologin
ben:x:1001:126::/home/ben:/bin/sh
The UUID of the 2TB disk is listed in fstab so I have no issues there.
/etc/group =
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog,exharris
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:exharris
floppy:x:25:
tape:x:26:
sudo:x:27:exharris
audio:x:29:pulse
dip:x:30:exharris
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:plex
sasl:x:45:
plugdev:x:46:exharris
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
input:x:104:
crontab:x:105:
syslog:x:106:
messagebus:x:107:
mlocate:x:108:
ssl-cert:x:109:
uuidd:x:110:
avahi-autoipd:x:111:
bluetooth:x:112:
netdev:x:113:
rtkit:x:114:
ssh:x:115:
lpadmin:x:116:exharris
whoopsie:x:117:
scanner:x:118:saned
saned:x:119:
pulse:x:120:
pulse-access:x:121:
avahi:x:122:
colord:x:123:
sddm:x:124:
geoclue:x:125:
exharris:x:1000:
sambashare:x:126:exharris
plex:x:127:
rdma:x:128:
I get the following error when trying to acess
The file or folder smb://ben@192.168.1.10/NUC-EXT2-2TB-Plex does not exist.
Do credentials have to be input in a strange way when accessing from other machines? The EXT2-2TB is deffo there...
Can anyone else help so I can write to the plex folders from other machines on the LAN via Samba?