need help with my nass and recording
Added by Alysandyr colquhoun almost 5 years ago
need a bit of help
i have a rpi4 running raspbian with tvh installed i have mounted my nass and i can see files in there but when i try to record to it it says file not created
any one able to help or point me in the right direction
in /etc/fstab i ahve
//192.168.0.102/TVH /home/pi/Nass cifs username=admin,password=*** 0 0
it mounts at boot and i can see the folders inside
Replies (18)
RE: need help with my nass and recording - Added by Hiro Protagonist almost 5 years ago
Would need to see 'ls -lahF' of the recording path, and also need to know the user TVH is running as.
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
drwxr-xr-x 2 root root 0 Oct 20 15:36 ./
drwxr-xr-x 19 pi pi 4.0K Dec 26 14:18 ../
drwxr-xr-x 2 root root 0 Oct 21 20:14 Aly/
and it is running as its default user
RE: need help with my nass and recording - Added by Hiro Protagonist almost 5 years ago
Only root has write access to that directory.
chmod 777 /path/to/recordings
RE: need help with my nass and recording - Added by Dave H almost 5 years ago
Hiro Protagonist wrote:
Only root has write access to that directory.
chmod 777 /path/to/recordings
Better instead to change ownership to the TVH user, whatever that is (hts:video on my system)
sudo chown -R user:group /path/to/recordings
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
my tvh is using hts
so what would i put in the user:group bit
sudo chown -R user:group /home/pi/Nass
RE: need help with my nass and recording - Added by Dave H almost 5 years ago
Well the user would be hts and the group would be whatever group is the hts user's primary group. You can find out using:
groups hts
The answer is the first in the list. In my case:
$ groups hts
hts : video
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
i have done
sudo chown -R hts:hts /home/pi/Nass
and chmod 777
when i done groups hts i got hts:hts
drwxr-xr-x 2 root root 0 Oct 20 15:36 ./
drwxr-xr-x 20 pi pi 4.0K Dec 27 01:00 ../
drwxr-xr-x 2 root root 0 Oct 21 20:14 Aly/
and when i try record it say file not created or file missing
RE: need help with my nass and recording - Added by Dave H almost 5 years ago
You don't need to do both. Either will work. But your ls output shows that you haven't done either. Please show the full output including all the commands you have used together with their output. Please also run the commands:
id
id hts
and show their output
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
pi@TVH-Server:~ $ sudo chown -R hts:hts /home/pi/TVHNass
pi@TVH-Server:~ $ cd TVHNass
pi@TVH-Server:~/TVHNass $ ls -lahF
total 4.0K
drwxr-xr-x 2 root root 0 Dec 27 20:54 ./
drwxr-xr-x 20 pi pi 4.0K Dec 27 01:00 ../
drwxr-xr-x 2 root root 0 Oct 21 20:14 Aly/
then
pi@TVH-Server:~ $ id
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),116(davfs2),997(gpio),998(i2c),999(spi)
pi@TVH-Server:~ $ id hts
uid=110(hts) gid=115(hts) groups=115(hts)
pi@TVH-Server:~ $
RE: need help with my nass and recording - Added by Hiro Protagonist almost 5 years ago
Alysandyr colquhoun wrote:
pi@TVH-Server:~ $ sudo chown -R hts:hts /home/pi/TVHNass
pi@TVH-Server:~ $ cd TVHNass
pi@TVH-Server:~/TVHNass $ ls -lahF
total 4.0K
drwxr-xr-x 2 root root 0 Dec 27 20:54 ./
drwxr-xr-x 20 pi pi 4.0K Dec 27 01:00 ../
drwxr-xr-x 2 root root 0 Oct 21 20:14 Aly/
Nothing has changed in TVHNass - are you sure you don't have it mounted read-only?
Please post the output from 'mount'.
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
2 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1867792k,nr_inodes=117769,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
//192.168.0.102/movies on /home/pi/Nass type cifs (rw,relatime,vers=default,cache=strict,username=admin,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.102,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
//192.168.0.102/TVH on /home/pi/TVHNass type cifs (rw,relatime,vers=default,cache=strict,username=admin,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.102,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=399976k,mode=700,uid=1000,gid=1000)
RE: need help with my nass and recording - Added by Hiro Protagonist almost 5 years ago
Alysandyr colquhoun wrote:
//192.168.0.102/TVH on /home/pi/TVHNass type cifs (rw,relatime,vers=default,cache=strict,username=admin,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.102,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
OK, I don't use cifs, so you might need someone else to help with the details, but this looks to be a problem: file_mode=0755,dir_mode=0755
As it stands, you've only got write access for root [filesystems are mounted by root]. You need write access for your TVH user. Changing both of the above to 777 should fix that.
RE: need help with my nass and recording - Added by Hiro Protagonist almost 5 years ago
Just for completeness, you could change the uid/gid, but for practical purposes, it usually makes sense to mount filesystems 777 unless you have a pressing need to do otherwise.
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
so how do i change this ?
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
tbh i dont care how it connects or what file system it uses as long as i can record i am happy
RE: need help with my nass and recording - Added by Dave H almost 5 years ago
OK, I don't use cifs either. So you'll need to find somebody who does understand it. But basically you're using a remote filesystem using cifs and haven't given it enough permissions to be able to manage it on the client pi. You'll need to find the appropriate commands to remount it with the right permissions.
Hiro is very keen to make things 777. That's generally very bad security practice and I don't recommend it. It's much better to understand the situation and set permissions accordingly.
RE: need help with my nass and recording - Added by Alysandyr colquhoun almost 5 years ago
is there another way my nass is a wd my cloud
RE: need help with my nass and recording - Added by Hiro Protagonist almost 5 years ago
Alysandyr colquhoun wrote:
so how do i change this ?
OK, with the caveat that I'm unfamiliar with cifs mounts, what I'd to is take a look at /etc/fstab and see if the uid/gid for TVHNass is specified there.
If it is, first make a backup copy of /etc/fstab, then change the uid/gid settings from 0 to the uid & gid shown by 'id hts' you posted earlier.
You'll then need to unmount & then mount TVHNass [or reboot].
Good luck.