On Thu, Mar 1, 2018 at 10:57 AM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Thu, Mar 1, 2018 at 10:53 AM, Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
On Wed, Feb 28, 2018 at 6:37 PM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
Again, show me how KDE does it for USB disk *with ext4 on it*.
As a start, the mount directory belongs to the user. I just plugged in a ext4 USB disk, and the mount point in /run/media/roger/ is:
drwxr-xr-x 2 roger users 8192 Feb 1 2017 DriveA
And your claim is that owner and permissions come from KDE automounter and not from filesystem on this disk? Mount it manually, without use of KDE automounter, and show permissions in this case.
It's mounted on a directory that belongs to me, that is also located in a directory that belongs to me.
And how is it related to permissions of root inode on mounted filesystem which is what controls access after it has been mounted?
If course if there are things in the drive that do not belong to me, I can do nothing.
It is the mount point itself that I am concerned about.
Mouunt point permissions are irrelevant after it has been mounted over.
Not true for the top level. If the directory before the mount has 0777 (all rwx), after the mount those will be the permissions for the root of the mounted volume. With those permissions, ANYONE can make a folder or file in the top level. Existing files and all in the mounted volume of course are controlled by the permissions in the mounted volume. But the top level directory is different in this significant respect. Automount via systemd is setting the top level to 0700, with the owner as root. So no one else can do anything in the top level directory. In fact, a non-root user who owns a file in the top level like this cannot even delete this file that belongs to them because they don't have permissions on the top level directory.
I don't want this thread to be about KDE. It is about trying to make systemd automount work as I need.
You said that KDE does the right thing and I simply try to understand what "the right thing" is. So far you still did not explain it nor demonstrated that "the right thing" is controller by the program used to mount disk.
With KDE, the directory that contains the mount point belongs to the user who mounted it. It does not belong to root. Autofs via systemd makes the top level directory belong to root - no matter who mounted it. I would even be happy if the top level permissions were 0775. Then the user could join the group. But there are no group permissions at all. You have to be root. With removable media, this is an antiquated concept. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org