ftp causing invalid syntax

On 2018 May 17 05:38:56, you wrote to Richard Kettlewell:

TP> And I thought I was the grumpy old man...

by far, you are not the only grumpy old man here ;)

)\/(ark

Always Mount a Scratch Monkey Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong... ... Fight Crime: Shoot a politician

Reply to
mark lewis
Loading thread data ...

On 2018 May 17 09:08:28, you wrote to All:

Ro> and it returned: Ro> mount: mount point /mnt/CCTV/PiZero does not exist

you have to create the CCTV directory in /mnt... you might also have to create PiZero inside there unless it already exists on the other machine you are mounting...

)\/(ark

Always Mount a Scratch Monkey Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong... ... Having the right to do it doesn't always mean that doing it is right.

Reply to
mark lewis

And I thought I was the grumpy old man...

--
There?s a mighty big difference between good, sound reasons and reasons  
that sound good. 

Burton Hillis (William Vaughn, American columnist)
Reply to
The Natural Philosopher

I have tried: sudo mount -t cifs -o username=USERNAME,password=PASSWD //192.168.1.88/shares /mnt/share

and it returned: mount: mount point /mnt/CCTV/PiZero does not exist

I then changed it and added //192.168.0.22/CCTV /mnt/CCTV/PiZero in the fstab file The line in fstab looks like this: /192.168.0.22/CCTV /mnt/CCTV/Pizero, but till get the same error message as above mount point does not exist.

What have I missed.

Reply to
RobH

I think it means what it says. /mnt/CCTV/PiZero doesn't exist, you need to create the directory where something is to be mounted.

--
Chris Green
Reply to
Chris Green

yes. Mount is a process of replacing a local directory *contents* with a remote directory *contents*, conceptually

So e.g. mount ...... remote:/home/zaphod /home/remote-zaphod replaces the CONTENTS of /home/remote-zaphod with the *contents* of remote:/home/zaphod.

--
?it should be clear by now to everyone that activist environmentalism  
(or environmental activism) is becoming a general ideology about humans,  
about their freedom, about the relationship between the individual and  
the state, and about the manipulation of people under the guise of a  
'noble' idea. It is not an honest pursuit of 'sustainable development,'  
a matter of elementary environmental protection, or a search for  
rational mechanisms designed to achieve a healthy environment. Yet  
things do occur that make you shake your head and remind yourself that  
you live neither in Joseph Stalin?s Communist era, nor in the Orwellian  
utopia of 1984.? 

Vaclav Klaus
Reply to
The Natural Philosopher

I have just created mnt/CCTV/PiZero on the root folder of PiZero, and when I run the mount command, it still says that it does not exist.

I'm beat now!

Reply to
RobH

Does the directory on the NAS box you're trying to access exist?

Since none of the parameters for any 'mount' command you've shown us contain /mnt/CCTV/PiZero I think, to avoid confusion, you should show us:

- the output of "ls /" when run on both the Pi zero and your NAS box

- the exact 'mount' command that is failing and the error message (copy and paste the command line, "$ mount....", and the error line.

- an explanation of why you've added /mnt/CCTV/PiZero to /etc/fstab, and which system you did that on.

- what, if any, Linux reference guide you're using.

"Linux in a Nutshell" and

formatting link
are both good.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Yes the folder/directory/dataset does exist on my NAS box, and have been downloading pictures and video to /CCTV for about 3 years now. Now I want to dowonload video from my PiZero to /CCTV/PiZero on my NAS box

Pi Zero ls / . bin dev home lost+found media opt root sbin sys usr .. boot etc lib man mnt proc run srv tmp var

NAS box ls / .cshrc boot entropy mnt sys

.profile compat etc proc tmp

.rnd conf lib rescue usr

COPYRIGHT data libexec root var

bin dev media sbin

Why I added this /mnt/CCTV/PiZero to /etc/fstab, was because running the mount command kept say the said folder doesn't exist.

On my linux desktop I a similar line to the fstab file as I was using emby media player:

192.168.0.22:/mnt/WinShare/Media/Music /mnt/WinShare/Media/Music nfs auto, nofa$

And it works.

I am not using any reference guide, just from youtube and poster who reply to me.

Reply to
RobH

again (from earlier in the thread)

here I guess I need to clarify that you should exchange * USERNAME to the username used to log on to the NAS * PASSWORD to the password of above user on the NAS * //192.168.1.88/shares to the ipaddres of the NAS + the name of the share * /mnt/share to a local directory. /mnt/nas is not to bad

if /mnt/nas does not exist - create it : sudo mkdir /mnt/nas sudo chown -R pi:pi /mnt/nas

to fix permissions

so what does ls /mnt/CCTV/PiZero on the pi say ? Most likely that is does not exists.

The create it

sudo mkdir /mnt/CCTV/PiZero sudo chown -R pi:pi /mnt/CCTV/PiZero

if the NAS publish a file-share called CCTV and you want to reference that - deom the pi - with /mnt/CCTV/PiZero, then /mnt/CCTV/PiZero must exist on the pi.

--
--
Reply to
Björn Lundin

It never ocurred to you to create the directory, e.g.: $ mkdir /mnt/CCTV $ mkdir /mnt/PiZero

'mount' is for mounting disk partitions by creating a directory, typically in the root directory, that points to the partition - not for creating directories in partitions.

Then I strongly suggest you get "Linux in a Nutshell" and/or bookmark the Debian reference that I also mentioned and read. understand and inwardly digest what it they have to say about mounting remote filing systems.

'man mount' explains the specifics of using the 'mount' command. Reading either of the above gives the context you need to understand what happens when you mount a local partition and/or a remote mount point. Finding out about nfs and/or samba are also useful things to do. So is finding out about the 'apropos' command.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

On Thu, 17 May 2018 14:44:08 +0100, RobH declaimed the following:

Now, giggles, show us the result of:

ls /mnt

and

ls /media

If neither of those has a CCTV in them, you'll need to create it.

mkdir ...

{hopefully you realize the ... is to be replaced with the correct arguments}

fstab just tells the OS what file systems to mount during boot-up, so you don't have to do a manual mount everytime you reboot. It won't work unless the manual mount is successful.

And the odds are good that sometime, somewhere, a mkdir command was used to create the destination point.

I was afraid of that... cut&paste coding/administration: find an example of a statement, duplicate that statement in a different environment (entering shell statements into a Python script, Python statements into a shell prompt), and then get frustrated when they don't work.

Anecdote: Had a person like that at my place of employment many moons ago. Assignment: to configure four GPIB devices in an equipment rack when data collection was scheduled by another system. "Solution" write a program to configure one device -- based on cut&paste from example programs. When that program worked, it was cloned (3 times) and each modified to do configuration of the other three devices. Finally -- write a DCL script to chain the four programs together. We got to the deployment site, and were unable to get any data collection to work. We were only supposed to be there for two weeks. This person flew back to the US at the end of the time swearing that the programs (when tested individually) worked as expected, and no idea of why data collection failed. I got extended over the weekend to work this system -- never having coded GPIB interfacing before -- and going solely be the on-line documentation discovered:

All GPIB control programs had to start with an Initialize operation. Initialize RESETS ALL DEVICES on the bus!

So -- first program set up first device... Second program set up second device -- AFTER having reset the first one!

I had to consolidate the four programs into a single program that controlled all four devices. And do that in about 24 hours to get working data collection demonstrated before I could reschedule my return flight. /Anecdote

At the very least, learn to use "man".

man mount

{Had to squeeze the console to half width to avoid severe wrapping in this post} """ MOUNT(8) System Administration MOUNT(8)

NAME mount - mount a filesystem

SYNOPSIS mount [-lhV]

mount -a [-fFnrsvw] [-t vfstype] [-O optlist]

mount [-fnrsvw] [-o option[,option]...] device|dir

mount [-fnrsvw] [-t vfstype] [-o options] device dir

DESCRIPTION All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the filesystem found on some device to the big file tree. Conversely, the umount(8) command will detach it again.

The standard form of the mount command, is

mount -t type device dir

This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir. The previous contents (if any) and owner and mode of dir become invisible, and as long as this filesystem remains mounted, the pathname dir refers to the root of the filesystem on device.

If only directory or device is given, for example:

mount /dir

then mount looks for a mountpoint and if not found then for a device in the /etc/fstab file. """ {There's more, of course -- at that width, the entry for "mount" is over

2500 lines long; at normal width, 1900 lines!}

Key point: "dir" needs to exist first, after which "mount" attaches "device" "at the directory".

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

Not being grumpy, just suggesting learning a bit about the complex tool before using it.

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

Yes it did occur to me and it is under the /mnt folder or directory, but you can't see it

Why can't it be mkdir /mnt/CCTV/PiZero which I have done.

Reply to
RobH

you need sudo mkdir -p /mnt/CCTV/PiZero

-p allows create directories on the way

--
--
Reply to
Björn Lundin

Ok I removed the previously created directories or folder, and re created them as per mkdir for each folder, as doing as all in 1 line didn't create the CCTV/PIZero folders.

Now when I run the mount command, because I have used the filetype as NFS, it returns unknown filesystem type: nfs.

Then I changed it to a cifs filytype and it returned: mount error(115): Operation now in progress Refer to the mount.cifs(8) manual page (e.g mount cifs)

So I guess I'll have to read up on that, but why is NFS an unknown filesytem type, because I don't have any windows computers and my shares on the NAS box are all NFS shares.

Reply to
RobH

are you saying there are no cifs shares on the NAS?

a way of finding out is to use smbclient an exsample from my network

bnl@sebjlun-deb64:~/back_during_race$ smbclient --list 192.168.1.20 WARNING: The "syslog" option is deprecated Enter bnl's password: Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]

Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers IPC$ IPC IPC Service (Samba 4.5.12-Debian) bnl Disk Home Directories Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]

Server Comment --------- ------- IBM2 Samba 4.5.12-Debian TECHNICOLOR DSL Gateway

Workgroup Master --------- ------- WORKGROUP TECHNICOLOR

--
--
Reply to
Björn Lundin

so - for mounting the fileshar bnl that 192.168.1.20 publishes i do - on the pi (or in this can my linuxbox)

bnl@sebjlun-deb64:~$ ls -la /mnt/nas totalt 8 drwxrwxrwx 2 root root 4096 maj 7 2017 . drwxr-xr-x 4 root root 4096 maj 7 2017 ..

my mountpoint exists. mount the nas now

bnl@sebjlun-deb64:~$ sudo mount -t cifs -o username=bnl,password=SECRET //192.168.1.20/bnl /mnt/nas

bang - done

bnl@sebjlun-deb64:~$ ls -la /mnt/nas totalt 964 drwxr-xr-x+ 23 bnl bnl 0 maj 17 08:07 . drwxr-xr-x 4 root root 4096 maj 7 2017 ..

-rwxrw-r--+ 1 bnl bnl 7917 jun 11 2017 .bash_aliases

-rw-------+ 1 bnl bnl 44153 maj 17 08:07 .bash_history

-rw-r--r--+ 1 bnl bnl 220 maj 13 2017 .bash_logout

-rw-rw-r--+ 1 bnl bnl 4070 jun 11 2017 .bashrc drwxr-xr-x+ 2 bnl bnl 0 maj 13 2017 Bilder drwx------+ 11 bnl bnl 0 jun 11 2017 .cache drwx------+ 14 bnl bnl 0 jun 10 2017 .config drwx------+ 5 bnl bnl 0 jan 4 00:01 db drwx------+ 3 bnl bnl 0 maj 13 2017 .dbus

these are files on the nas

--
--
Reply to
Björn Lundin

No, I'm not saying that, it's more of that I have NFS shares as well as smb shares.

I login to my NAS box and can see at a glance what shares I have.

After I created the the said folders ie /mnt/CCTV/PiZero I then ran the python script for the sensor detection and camera , and it returned :

Traceback (most recent call last) File "intruder_recmotion.py", line 37, in shutil.copyfile(RAMname, NASname) File "/usr/lib/python 2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 2] No such file or directory: '/192.168.0.22/mnt/CCTV/PiZero/2018-16-16_11.25.36.h264'

I have checked the path to the PiZero folder or dataset on my FreeNAS box and it is correct.

Reply to
RobH

This is my NAS box folders:

[root@freenas ~]# ls -la /mnt

total 172

drwxr-xr-x 5 root wheel 256 Apr 17 12:19 .

drwxr-xr-x 19 root wheel 26 Apr 17 12:19 ..

drwxrwxr-x+ 4 root nobody 5 May 1 2017 Backup_Data

drwxrwxr-x+ 5 root nobody 13 May 8 12:02 CCTV

drwxrwxr-x+ 9 root nobody 39 Jan 14 09:45 WinShare

-rw-r--r-- 1 root wheel 5 Aug 13 2017 md_size

As you can see CCTV is already mounted and showing. PiZero is a sub dataset of CCTV on my NAS box

Reply to
RobH

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.