TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ROBH
from: ROBH
date: 2018-06-15 11:30:00
subject: Re: ftp causing invalid s

On 15/06/18 10:41, RobH wrote:
> On 15/06/18 00:32, Dennis Lee Bieber wrote:
>> On Thu, 14 Jun 2018 20:04:35 +0100, RobH  declaimed
>> the
>> following:
>>
>>>
>>> pi@raspberrypi:/mnt $ ls -l
>>> total 4
>>> drwxrwxrwx 3 pi pi 4096 Jun  5 09:50 CCTV
>>>
>>
>>     Try
>>
>> ls -lR
>>
>> and ensure that ALL directories, not just CCTV, have been changed.
>>
>>
>>     The other side of the coin (recall, I do not have a NAS unit) is
that
>> the NAS may need to be configured with privileges for users.
>>
>>     Forget about running the capture script... You need to get
everything
>> working from the command line first...
>>
>> Create some garbage file in your home directory
>>
>> $    date >~/junk.txt
>>
>> Then try moving that file to the mount point...
>>
>> $    mv ~/junk.txt /mnt/CCTV/PiZero/junk.txt
>>
>> That should represent what the script is trying to do.
>>
>>
>>
>>
>
> After creating the junk.txt file and moving it:
> pi@raspberrypi:~ $ mv ~/junk.txt /mnt/CCTV/PiZero/junk.txt
> mv: preserving times for '/mnt/CCTV/PiZero/junk.txt': Operation not
> permitted
> mv: preserving permissions for ‘/mnt/CCTV/PiZero/junk.txt’: Input/output
> error
>
> The said file was moved to my NAS box on /mnt/CCTV/PiZero and shows as
> 29 bytes but could not be opened. Because it is owned by root.

It can be opened now, and shows a date and time
>
>
> My NAS box is configured to accept connections and files from my CCTV
> cameras, so there is not the problem.
>
> One thing I have noticed, and why I never mentioned before , I don't know.
>
> When I do ls on the root of pi:
>
> pi@raspberrypi:~ $ ls
> Desktop    Downloads  Public    Templates
> Documents  Music      Pictures  python_games  Videos
> pi@raspberrypi:~ $
>
> the /mnt directory is not listed or showing, and that is because ls only
> lists what is under /pi   while /mnt is under /
>
As pointed out to me by another poster, I should have done cd /
then I would have seen the /mnt directory Doh!

> Just out of interest, I have created a /mnt directory under /pi, and
> also CCTV/PiZero, then changed permissions and ownership for all the
> directories.
>
> I am not sure but the python script might get confused as to which /mnt
> directory it should use.
>
  This now not necessary, as a solution was found

> Advise please

No Need thanks
------------------------------------------------------------------------

Forget or ignore most what I have written above, as I rebooted the
PiZero and it has now sorted the permissions problem with the /mnt
directory. Now the /mnt/CCTV/PiZero directories are all owned by pi and
permissions set accordingly, including the /mnt directory.

Now the script runs without error, but, even though there was a 4.8mb
file created on the PiZero, it was a 0 bytes file copied or moved to to
NAS box /mnt/CCTV/PiZero.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.