TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: GREGOR HERRMANN
from: ROBH
date: 2018-06-25 18:54:00
subject: Re: ftp causing invalid s

On 25/06/18 00:32, gregor herrmann wrote:
> On Sun, 24 Jun 2018 20:11:29 +0100, RobH wrote:
>
>> Then because of a reboot, I have to:
>> pi@raspberrypi:~ $ sudo mount -t cifs -o username=root,password=*****
//192.168.0.22/CCTV/PiZero/ /mnt/CCTV/PiZero
>>
>> And now:
>>
>> pi@raspberrypi:/mnt/CCTV $ ls -l
>> total 0
>> drwxrwxr-x 2 root nogroup 0 Jun 24 18:55 PiZero
>
>> So for some reason as soon  as the PIZero directory is mounted, it
>> becomes owned by root, as above with sudo mount.
> [..]
>> Before I mount the PiZero directory it is owned by pi:pi, but after I
>> mount the PiZero directory it is owned by root
>
> 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
>
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.

--- 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™.