SOLVED but WHY? (was Re: problem with ownership of files on Samba share)

SOLVED but WHY? (was Re: problem with ownership of files on Samba share)

Shlomo Solomon shlomo.solomon at gmail.com
Fri Aug 24 13:21:23 IDT 2018


I think you're pointing me in the right direction, but still missing
something.
Here's the output of mount | grep PI-PUBLIC

solomon at shlomo1:~$ mount | grep PI-PUBLIC
//pi/PI-PUBLIC on /mnt/PI-PUBLIC type cifs
(rw,nosuid,nodev,noexec,relatime,vers=default,cache=strict,username=solomon,domain=,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.51,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1,user)

uid=0,noforceuid,gid=0,noforcegid    seemed strange, so I added my
actual uid and gid to /etc/fstab. So instead of:

//pi/PI-PUBLIC /mnt/PI-PUBLIC cifs
user,credentials=/etc/samba/auth.pi.solomon 0 0

I now have:
//pi/PI-PUBLIC /mnt/PI-PUBLIC cifs
user,uid=500,gid=500,credentials=/etc/samba/auth.pi.solomon 0 0 

The result: Both of the following incorrectly show all files as owned
by solomon

smb://solomon@pi/PI-PUBLIC/
/mnt/PI-PUBLIC/

Before the change,   /mnt/PI-PUBLIC/  showed all files owned by root.

But   fish://pi/media/PUBLIC/    still  shows correct ownership





On Fri, 24 Aug 2018 12:21:18 +0300
shimi <linux-il at shimi.net> wrote:

> Maybe the Dolphin mount (via kio-smb I guess?) runs the mount command
> with parameters like uid=$USER,gid=$USER ?
> 
> Have you compared the options of the two mounts when they're both
> mounted with "mount | grep PI-PUBLIC" ?
> 
> On Fri, Aug 24, 2018 at 9:56 AM, Shlomo Solomon
> <shlomo.solomon at gmail.com> wrote:
> 
> > Answering my own post with a solution, but I don't know WHY this
> > works.
> >
> > I discovered that if I access   fish://pi/media/PUBLIC/  in Dolphin
> > the file ownerships are shown correctly.
> >
> > Can anyone tell me why this works when the following 2 don't?
> >  
> > > If I access /mnt/PI-PUBLIC in Dolphin, all the files "seem" to be
> > > owned by root.
> > > If I access smb://solomon@pi/PI-PUBLIC/  then all the files
> > > "seem" to be owned by solomon.  
> >
> >
> >
> >
> >
> >
> > On Fri, 17 Aug 2018 10:58:06 +0300
> > Shlomo Solomon <shlomo at the-solomons.net> wrote:
> >  
> > > Since moving from Mageia5 to Kubuntu 18.04 I have an annoying
> > > problem.
> > >
> > > I have a Raspberry PI  file server running Samba and sharing
> > > PI-PUBLIC. Files are created (and owned) by various users.
> > >
> > > This is a mixed Linux and Windows network.
> > > All Linux computers on the network (including the PI) have the
> > > same users and UIDs, to prevent confusion about file ownership.
> > > In the PI-PUBLIC section of smb.conf on the PI, all the relevant
> > > users are listed as valid users =
> > >
> > > In Mageia I could mount the share with either of the
> > > following /etc/fstab entries (note that pi is defined
> > > in /etc/hosts):
> > >
> > > //pi/PI-PUBLIC  /mnt/PI-PUBLIC  cifs
> > > username=solomon,password=mypassword,rw,user 0 0
> > >
> > > //pi/PI-PUBLIC /mnt/PI-PUBLIC cifs
> > > user,credentials=/etc/samba/auth.pi.solomon 0 0
> > >
> > > But in Kubuntu, all the files "seem" to be owned by the wrong
> > > user. If I access /mnt/PI-PUBLIC in Dolphin, all the files "seem"
> > > to be owned by root.
> > > If I access smb://solomon@pi/PI-PUBLIC/  then all the files
> > > "seem" to be owned by solomon.
> > >
> > >
> > >  
> >
> >
> >
> > --
> > Shlomo Solomon
> > http://the-solomons.net
> > Claws Mail 3.16.0 - Kubuntu 18.04
> >
> > _______________________________________________
> > Linux-il mailing list
> > Linux-il at cs.huji.ac.il
> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> >  



-- 
Shlomo Solomon
http://the-solomons.net
Claws Mail 3.16.0 - Kubuntu 18.04



More information about the Linux-il mailing list