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
--
.''`. 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
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|