On 23/05/18 08:41, Björn Lundin wrote:
> On 2018-05-22 23:10, RobH wrote:
>
>> [root@freenas ~]# ls -la /CCTV/PiZero
>> ls: /CCTV/PiZero: No such file or directory
>> [root@freenas ~]#
>>
>> The directory is there as I can see it in the Storage menu
>
>
> Yes, it is usually somewhere in /shares or /Shares
> or another top directory.
>
> so what you see as /CCTV/PiZero in a menu is really
> /shares/CCTV/PiZero or something similar -perhaps
> /mnt/CCTV/PiZero
> or
> /media/CCTV/PiZero
> pi@raspberrypi:~ $ sudo echo "test" > /mnt/CCTV/PiZero/test.txt
-bash: /mnt/CCTV/PiZero/test.txt: Permission denied
pi@raspberrypi:~ $ sudo chown -R pi:pi /mnt/CCTV/PiZero
pi@raspberrypi:~ $ sudo echo "test" > /mnt/CCTV/PiZero/test.txt
pi@raspberrypi:~ $ ls -la /mnt/CCTV/PiZero
total 11
drwxr-xrwx 2 pi pi 0 May 23 09:28 .
drwxr-xr-x 3 pi pi 4096 May 17 17:36 ..
-rw-r--r-- 1 pi pi 0 May 21 11:50 2018-050-21_11.50.09.h264
-rw-r--r-- 1 pi pi 0 May 22 09:46 2018-050-22_09.46.39.h264
-rw-r--r-- 1 pi pi 0 May 22 09:51 2018-050-22_09.51.12.h264
-rw-r--r-- 1 pi pi 0 May 22 11:35 2018-050-22_11.34.55.h264
-rw-r--r-- 1 pi pi 0 May 22 11:44 2018-050-22_11.44.02.h264
-rw-r--r-- 1 pi pi 0 May 22 11:46 2018-050-22_11.46.02.h264
-rw-r--r-- 1 pi pi 0 May 19 17:31 2018-19-19_17.31.32.h264
-rw-r--r-- 1 pi pi 0 May 19 17:40 2018-19-19_17.40.13.h264
-rw-r--r-- 1 pi pi 0 May 19 17:43 2018-19-19_17.43.42.h264
-rw-r--r-- 1 pi pi 0 May 20 19:02 2018-20-20_19.01.50.h264
-rw-r--r-- 1 pi pi 0 May 20 19:08 2018-20-20_19.08.38.h264
-rw-r--r-- 1 pi pi 0 May 20 20:02 2018-20-20_20.02.21.h264
-rw-r--r-- 1 pi pi 0 May 20 20:51 2018-20-20_20.51.49.h264
-rw-r--r-- 1 pi pi 5 May 23 09:28 test.txt
pi@raspberrypi:~ $
>>
>> As I posted earlier, does something need to be entered on the /etc/fsab
>> file somewhere.
>
> no - not on nas
> on pi - if you want the mount automatically at boot.
> but if you bork that file up - you may end up with an unbootable system.
> It is fixable from another linuxbox but tricky if you are on a newbie level.
>
>
>
> To rule out errors in script :
> manually put a file in the pi directory,
> as I said upthread.
> the part with
> echo "test" > /mnt/CCTV/PiZero/test.txt
> or
> sudo echo "test" > /mnt/CCTV/PiZero/test.txt
>
>
> ls -la /mnt/CCTV/PiZero then
> and post here
>
>
>
>
As you can see, I had to give permissions again for the 'echo test'
command to run.
pi@raspberrypi:~ $ sudo echo "test" > /mnt/CCTV/PiZero/test.txt
-bash: /mnt/CCTV/PiZero/test.txt: Permission denied
pi@raspberrypi:~ $ sudo chown -R pi:pi /mnt/CCTV/PiZero
pi@raspberrypi:~ $ sudo echo "test" > /mnt/CCTV/PiZero/test.txt
pi@raspberrypi:~ $ ls -la /mnt/CCTV/PiZero
total 11
drwxr-xrwx 2 pi pi 0 May 23 09:28 .
drwxr-xr-x 3 pi pi 4096 May 17 17:36 ..
-rw-r--r-- 1 pi pi 0 May 21 11:50 2018-050-21_11.50.09.h264
-rw-r--r-- 1 pi pi 0 May 22 09:46 2018-050-22_09.46.39.h264
-rw-r--r-- 1 pi pi 0 May 22 09:51 2018-050-22_09.51.12.h264
-rw-r--r-- 1 pi pi 0 May 22 11:35 2018-050-22_11.34.55.h264
-rw-r--r-- 1 pi pi 0 May 22 11:44 2018-050-22_11.44.02.h264
-rw-r--r-- 1 pi pi 0 May 22 11:46 2018-050-22_11.46.02.h264
-rw-r--r-- 1 pi pi 0 May 19 17:31 2018-19-19_17.31.32.h264
-rw-r--r-- 1 pi pi 0 May 19 17:40 2018-19-19_17.40.13.h264
-rw-r--r-- 1 pi pi 0 May 19 17:43 2018-19-19_17.43.42.h264
-rw-r--r-- 1 pi pi 0 May 20 19:02 2018-20-20_19.01.50.h264
-rw-r--r-- 1 pi pi 0 May 20 19:08 2018-20-20_19.08.38.h264
-rw-r--r-- 1 pi pi 0 May 20 20:02 2018-20-20_20.02.21.h264
-rw-r--r-- 1 pi pi 0 May 20 20:51 2018-20-20_20.51.49.h264
-rw-r--r-- 1 pi pi 5 May 23 09:28 test.txt
pi@raspberrypi:~ $
I've just realised that FreeNAS resides on a 16gb SSD drive and all the
storage drives are listed or mounted by FreeNAS, and the data on them is
managed by FreeNAS, if that sounds right.
This is the Freenas system:
[root@freenas ~]# ls
.bash_history .gdbinit .login .ssh
.bashrc .history .profile secrets.tdb
.cshrc .k5login .shrc
[root@freenas ~]#
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|