Re: sshfs has fubared mount
On Wednesday 10 February 2021 04:08:15 Andrei POPESCU wrote:
> On Ma, 09 feb 21, 13:00:23, David Christensen wrote:
> > We were all confused by a feature of mount(1) -- mounting a remote
> > filesystem changes the owner and group of the mount point on the
> > local machine while the remote filesystem is mounted:
>
> Maybe it's easier to understand that a file system is mounted "on top"
> of a mount point (which is typically, but not necessarily, an empty
> directory).
>
> There is no change of permissions involved, one is just looking at two
> different directories, that just happen to be attached at the same
> point in the file system hierarchy.
>
> > 2021-02-09 12:13:43 dpchrist@tinkywinky ~
> > $ mount | grep '/po'
> >
> > 2021-02-09 12:23:26 dpchrist@tinkywinky ~
> > $ ls -ld /po
> > drwxr-xr-x 2 dpchrist dpchrist 4096 Jan 21 13:32 /po
> >
> > 2021-02-09 12:23:29 dpchrist@tinkywinky ~
> > $ mount /po
> >
> > 2021-02-09 12:24:14 dpchrist@tinkywinky ~
> > $ mount | grep '/po'
> > po:/ on /po type fuse.sshfs
> > (ro,nosuid,nodev,noexec,relatime,user_id=13250,group_id=13250,user=d
> >pchrist)
> >
> > 2021-02-09 12:24:17 dpchrist@tinkywinky ~
> > $ ls -ld /po
> > drwxr-xr-x 1 root root 4096 Aug 30 18:09 /po
>
> These are the permissions of the root directory of the mounted file
> system.
>
> > The owner and group are restored when the filesystem is unmounted:
> >
> > 2021-02-09 12:24:21 dpchrist@tinkywinky ~
> > $ fusermount -u /po
> >
> > 2021-02-09 12:25:45 dpchrist@tinkywinky ~
> > $ ls -ld /po
> > drwxr-xr-x 2 dpchrist dpchrist 4096 Jan 21 13:32 /po
>
> Here you are looking again at the mount point.
>
> Kind regards,
> Andrei
Going back in history to when that original /sshnet was initially set up,
I faintly recall have to do that mkdir as root but then had to change
its ownership to me, and then I was able to mkdir the other subdirs as
mount points I could use as me.
But where I was now forced to use root to make this newer subdir, because
the re-organization of all this crap that hides root only commands from
the user, now forced me to use root to make that new subdir even though
I owned the parent directory. So I was by some, to me missquided
thinking about security, forced to use root AND as root change the
ownership to me before it would work as intended.
So that decision by somebody in a position to change the distribution
cost me, and several other trying to help which I thank ypu for, over a
week to find and fix the perms problem. I'm happy its fixed, but this
sort of stuff contributes nothing to security AFAIAC, and is the sort of
stuff normally found on the ground, warm, even steaming, behind the male
of the bovine specie. I can't begin to describe the odor from a 20 acre
missnomer called a "drylot", with 250 head of them, eating nothing but
ear corn from a 50,000 bushel self feeder, even 100 yards upwind on a 5F
morning in February. Mear words are not adequate. I may have made a more
than adequate living in electronics for 73 years now, but I was raised
on an Iowa farm. BTDT, remember it well 73 years later.
Again, I thank all that helped, while probably wondering what this old
fart is up to now. What I am doing is making it save me work by making
it do what I want it to do. That doesn't seem like such an un-reasonable
expectation to me. OTOH, I am probably the individual George Bernard
Shaw was describeing when he stated that all progress was made by an
un-reasonable man, seen in sigs now and again.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>
Reply to: