ftp causing invalid syntax

You might want to change that root password now you've just posted it.

--
--------------------------------------+------------------------------------ 
Mike Brown: mjb[-at-]signal11.org.uk  |    http://www.signal11.org.uk
Reply to
Mike
Loading thread data ...

Oops, sorry , wrong command before.

pi@raspberrypi:~ $ ls -la /mnt/CCTV/PiZero total 11 drwxr-xrwx 2 pi pi 0 May 22 11:46 . 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 root pi 0 May 22 11:44 2018-050-22_11.44.02.h264

-rw-r--r-- 1 root 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 pi@raspberrypi:~ $

Reply to
RobH

hmm, not sure here, you seem to be able to *create* a file but not write to that same file

what does la -la /CCTV/PiZero on the *NAS* show.

--
--
Reply to
Björn Lundin

Yes I have already done that after I realised what I did

Reply to
RobH

[root@freenas ~]# la -la /CCTV/PiZero

bash: la: command not found

[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

As I posted earlier, does something need to be entered on the /etc/fsab file somewhere.

Reply to
RobH

On Tue, 22 May 2018 20:25:52 +0100, RobH declaimed the following:

Must be a mistake in the datetime formatting.. "050" should just be "05". But I don't see it in my prototype...

And those duplicated the day in the month position.

Out of curiousity -- with the .unlink() commented out -- what size do the files show in /dev/shm?

I'm wondering if the camera library isn't flushing/closing the capture file before the copy to NAS is done...

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

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

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

--
--
Reply to
Björn Lundin

-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 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 ~]#
Reply to
RobH

With .unlink commented out the files on the PiZero /dev/shm are all about 2.8mb in size, from file/properties, and yet when I:

pi@raspberrypi:~ $ ls -la /mnt/CCTV/PiZero total 12 drwxr-xrwx 2 pi pi 0 May 23 09:47 . 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 root pi 0 May 23 09:47 2018-050-23_09.47.38.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

And now they are 0 bytes in size?????

Reply to
RobH

There you go. You got a file of 5 bytes ('test' + LF)

if you see that file and it contents from the nas, you are almost there.

mount (in this case) is about seeing another filesystem. And that yuu do. Why the videos are 0 byte is likely in the script then. (perhaps as someone else suspected - camera not flushing to disk)

--
--
Reply to
Björn Lundin

Yes the test.txt file I see on my FreeNAS /CCTV/PiZero directory is indeed 5 bytes in size.

It does look like there is something in the python script which is causing the video files to be only 0 bytes on my FreeNAS /PiZero directory.

Thanks

Reply to
RobH

And you might want to make it significantly more complex, 5 upper case letters could be cracked in seconds. I also don't use root, create a user account with access to only the directories on the NAS that are needed.

Even if you have your local network firewalled off from the internet, if you accidentially run malware such ransomware on your PC, it may well be able to crack such an obvious username and password on the NAS, and scramble all the files.

---druck

Reply to
druck

That was *my* edit to remove the original password, rather than repost it AGAIN.

--
--------------------------------------+------------------------------------ 
Mike Brown: mjb[-at-]signal11.org.uk  |    http://www.signal11.org.uk
Reply to
Mike

Waste of time. Once it?s out, it?s out.

--
https://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

The internet never forgets. Barn, door, horses, some assembly required.

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie

Yes. but it's also far too big for everybody to find everthing. A little editing to make it that bit more difficult for the miscreants is a good thing and I applaud it.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

Netiquette ...

Or as someone said up-thread, "waste of time" :)

--
--------------------------------------+------------------------------------ 
Mike Brown: mjb[-at-]signal11.org.uk  |    http://www.signal11.org.uk
Reply to
Mike

what is the size when you do the move manually? that is mv /dev/shm/file_of_size_greater_than_zero /mnt/CCTV/PiZero/ ls -la /mnt/CCTV/PiZero/file_of_size_greater_than_zero

--
--
Reply to
Björn Lundin

Hello RobH!

04 Jun 18 17:53, you wrote to Andy Burns:

Ro> sudo mount -t cifs -o //192.168.0.22/CCTV/PiZero /mnt/CCTV/PiZero Ro> mount: can't find /mnt/CCTV/PiZero in /etc/fstab Ro> pi@raspberrypi:~ $

You cannot use the -o option without a parameter. So either add a parameter or leave it out.

Kees

Reply to
Kees van Eeten

Hello RobH!

04 Jun 18 17:53, you wrote to Andy Burns:

Ro> That returns this:

Ro> sudo mount -t cifs -o //192.168.0.22/CCTV/PiZero /mnt/CCTV/PiZero Ro> mount: can't find /mnt/CCTV/PiZero in /etc/fstab Ro> pi@raspberrypi:~ $

In addition to my other reply:

mount expects a source device and a mount point, if one or the other is missing, mount consults the /etc/fstab for the missing value.

In the above example the sorce device follows -o and is thus seen as the paramater to -o wich should be aan option. As now the source device is missing the mountpoint is looked up in /etc/fstab to find the missing source device.

So remove the -o and let mount apply the defaults. If the defaults are not sufficient, put de needed values behind the -o

Kees

Reply to
Kees van Eeten

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.