ftp causing invalid syntax

pi@raspberrypi:~ $ ls -la total 128 drwxrwxrwx 20 pi pi 4096 Jun 24 18:46 . drwxr-xr-x 3 root root 4096 Sep 7 2017 ..

pi@raspberrypi:~ $ umount /mnt/CCTV/PiZero umount: /mnt/CCTV/PiZero: umount failed: Operation not permitted pi@raspberrypi:~ $ sudo umount /mnt/CCTV/PiZero pi@raspberrypi:~ $

Sorry I forgot to say that there was an entry for the test.txt in the PiZero directory, but not on the NAS as it returned denied permission

Reply to
RobH
Loading thread data ...

yes, the /mnt/CCTV folder is just a folder on the Pi, it's only the PiZero folder underneath it that's a mount point for the NAS, if the NAS also happens to have a CCTV folder above its PiZero folder, that's of no consequence ...

Reply to
Andy Burns

[..]

Looking at man 8 mount.cifs I find:

uid=arg sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not spec? ified, the default is uid 0. The mount.cifs helper must be at version 1.10 or higher to support specify? ing the uid in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

gid=arg sets the gid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a groupname or a numeric gid. When not specified, the default is gid 0. The mount.cifs helper must be at version 1.10 or higher to support specifying the gid in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS [lots of background]

So maybe it helps to add these options, like

sudo mount -t cifs -o username=root,password=*****,uid=pi,gid=pi //192.168.0.22/CCTV/PiZero/ /mnt/CCTV/PiZero

gregor

--
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org 
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06 
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe 
   `-   NP: Donovan: Epistle To Dippy
Reply to
gregor herrmann

Thanks for the above and I tried the said sudo mount line, and it didn't complain after it was run.

Now if I do: pi@raspberrypi:~ $ echo "hello" > /mnt/CCTV/test.txt

It gets created in the PiZero CCTV folder

Now if I do: echo "hello" > /mnt/CCTV/PiZero/test.txt

It doesn't get created, even tho' there was no follow up message about denied permission.

Aah , but it did get created on the NAS box PiZero folder.

And now , guess what!, it is working great! The video files are transferred/ moved or created on the NAS box PiZero folder.

Thank you very much for taking the time and trouble to find the information and the above help.

Reply to
RobH

On Mon, 25 Jun 2018 18:54:30 +0100, RobH declaimed the following:

As expected given the mount command

Also as expected for the mount command...

The mount command is very specific... Since you specified /CCTV/PiZero on both the device and the mount point, ONLY the PiZero part has been mounted, and the CCTV level is still local to each side.

If the mount command only specified /CCTV, then both of the echo test statements should have generated files on the NAS, as you'd be mounted at a higher level in the directory structure (and the /PiZero on the NAS side would be visible because it is inside the /CCTV level that was mounted).

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

I think I follow what you are saying, and I didn't realise that about the /CCTV directory.

Anyway, it is working great now and thanks to you who provided me with the code to get the videos on my NAS box, and also for your patience and understanding with me.

I wish I could do something in return but I doubt that I could.

Thanks again for your help.

Reply to
RobH

You can see some weird effects because of mounting

e.g. when the NAS isn't mounted then /mnt/CCTV/PiZero is just a normal folder, from within bash you can "cd /mnt/CCTV/PiZero" into that folder, do an "ls" and see it's empty (or has some local files in it)

then if you do "mount {options} //192.168.0.22/CCTV/PiZero /mnt/CCTV/PiZero"

that bash process still has its cwd as the empty folder, which you can chech with "pwd" so if you "ls" you'll still see an empty folder,

but if you "ls /mnt/CCTV/PiZero" you'll see the remote folder

Reply to
Andy Burns

Yes it does indeed show the remote folder with all of the files which have been created this evening.

Oh and thanks to you for your help with this problem of mine.

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.