On 13/06/18 20:27, Dennis Lee Bieber wrote:
> On Wed, 13 Jun 2018 20:03:38 +0100, RobH declaimed the
> following:
>
>
>> RAMname = os.path.join("/run/shm", fname)
>> NASname = os.path.join("//192.168.0.22/mnt/CCTV/PiZero" , fname)
>>
>
> And as you've been repeatedly told, the path in NASname is supposed to
> be the location in the RPi where you put the mount point. It is NOT
> supposed to be a reference to the remote device itself.
>
> Presuming the mount point ON THE RPi is /mnt/CCTV/PiZero then THAT is
> what you want in that .join() operation. Take out the //192.168.0.22
>
>
>> Filesystem Size Used Avail Use% Mounted on
> ^^^^^^^^^^ physical location path to access it ^^^^^^^^^^^
>
>> /dev/root 15G 4.1G 9.9G 30% /
>> /dev/mmcblk0p1 42M 21M 21M 51% /boot
>> tmpfs 38M 4.0K 38M 1% /run/user/1000
>> //192.168.0.22/CCTV/PiZero/ 899G 2.7G 897G 1% /mnt/CCTV/PiZero
> ^^^^^^^^^^ physical location path to access it ^^^^^^^^^^^
>
>
Thanks and it took a while to get to sink in: Doh!
Now it's permissions problems, and I have googled how to change
permissions on file and folders, but no joy as yet.
I have tried:
pi@raspberrypi:/mnt $ sudo chown -R 777 /mnt/CCTV
pi@raspberrypi:/mnt $ sudo chown -R 777 /mnt
pi@raspberrypi:/mnt $ sudo chown -R 777 /mnt/CCTV
pi@raspberrypi:/mnt $ sudo chown -R 777 /mnt/CCTV/PiZero/
pi@raspberrypi:/mnt $
pi@raspberrypi:/mnt $ ls -l
total 4
drwxr-xr-x 3 777 root 4096 Jun 5 09:50 CCTV
Then ran the python script and got the permissions problem again
pi@raspberrypi:~/Downloads $ python intruder.py
Traceback (most recent call last):
File "intruder.py", line 37, in
shutil.copyfile(RAMname, NASname)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied:
'/mnt/CCTV/PiZero/2018-06-14_10.12.34.h264'
In PiZero's file manager the folders /CCTV and /PiZero have their read
and write permission set for anyone, but the /mnt directory is not.
I tried:
pi@raspberrypi:~ $ cdmod -R a+rX /mnt
-bash: cdmod: command not found
pi@raspberrypi:~ $ chmod -R a+rX /CCTV/Pizero
chmod: cannot access '/CCTV/Pizero': No such file or directory
pi@raspberrypi:~ $
Thanks
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|