On 20/05/18 21:41, Björn Lundin wrote:
> On 2018-05-20 20:00, RobH wrote:
>> I did sudo chown pi:pi /mnt/CCTV/PiZero and sudo chown pi:pi /mnt/CCTV
>>
>> Then I:
>> pi@raspberrypi:~ $ sudo mount //192.168.0.22/CCTV/PiZero /mnt/CCTV/PiZero
>> Password for root@//192.168.0.22/CCTV/PiZero: ******
>> pi@raspberrypi:~ $
>>
>> No error messages of any kind now, so in the script you provided, where
>> or what should I change to incorporate FreeNAS ip address.
>
> great.
> before fiddling with the script try this
>
> echo "test" > /mnt/CCTV/PiZero/test.txt
>
> check on you nas if you see the file at CCTC/piZero
> if you do - then try the script
>
> if you get permission denied, try
>
> sudo echo "test" > /mnt/CCTV/PiZero/test.txt
>
> check again.
>
> if ok (you see in in the nas)
> remove the file with
>
> sudo rm /mnt/CCTV/PiZero/test.txt
>
>
> fix permissions
> sudo chown -R pi:pi /mnt/CCTV/PiZero
>
> (note '-R' for recursive)
>
> and try again
>
> echo "test" > /mnt/CCTV/PiZero/test.txt
> if ok, try the script
>
>
>
>
>
>
Ok , things seem to be getting better here.
pi@raspberrypi:~ $ echo "test" > /mnt/CCTV/PiZero/test.txt
-bash: /mnt/CCTV/PiZero/test.txt: Permission denied
So:
pi@raspberrypi:~ $ sudo chown /mnt/CCTV/PiZero.
chown: missing operand after ‘/mnt/CCTV/PiZero’
Try 'chown --help' for more information.
pi@raspberrypi:~ $ sudo chown //192.168.0.22/CCTV/PiZero /mnt/CCTV/PiZero
chown: invalid user: ‘//192.168.0.22/CCTV/PiZero’
I left it for an hour or so, then tried again:
pi@raspberrypi:~ $ sudo echo "test" > /mnt/CCTV/PiZero/test.txt
-bash: /mnt/CCTV/PiZero/test.txt: Permission denied
So:
pi@raspberrypi:~ $ sudo chown -R pi:pi /mnt/CCTV/PiZero
pi@raspberrypi:~ $ sudo rm /mnt/CCTV/PiZero/test.txt
I then looked on my FreeNAS box , in the CCTV/PiZero directory, and to
my surprise, I saw files there from yesterday, and also the test.txt file.
The files from yesterday are the ones started by the python script on
motion detected, BUT, they are all 0 bytes.
So as I say, some improvment.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|