[PLUG] Reality collides with Linux worldview

Larry Brigman larry.brigman at gmail.com
Wed Apr 12 18:51:48 UTC 2017


Maybe with automount and udev rules it could get set automatically.

On Apr 12, 2017 8:39 AM, "Richard Owlett" <rowlett at cloud85.net> wrote:

> On 04/11/2017 01:13 PM, Richard Owlett wrote:
> > On 04/11/2017 12:30 PM, Paul Mullen wrote:
> >> On Tue, Apr 11, 2017 at 11:02:37AM -0500, Richard Owlett wrote:
> >>> Can fstab cause the partition's owner to 'universal' of group
> 'universe'?
> >>> NOTE BENE: spelling of 'universal'/'universe' intentional.
> >>>
> >>> The intention being that *all* users would *AUTOmagically* be members
> of
> >>> group 'universe'. Would require attention to creating same gid
> >>> automatically.
> >>
> >> FAT-based file systems have no concept of file ownership.  The Linux
> >> msdos and vfat file systems provide the ability to set static values
> >> for user, group, and permissions, though.  The "umask" option in your
> >> fstab entry is one of them.
> >>
> >> You can specify the owning user and group by adding the "uid" and
> >> "gid" options.  If left unset, they default to the user that mounts
> >> the partition (root, in your case).  Note that the value assigned to
> >> these options are the user's and group's numeric identifiers, not
> >> their names (e.g., "uid=1000").
> >>
> >> You can also specify permission mode masks separately for files and
> >> directories, which will eliminate your difficulty with file creation
> >> and deletion.  (A user must have execute permission for a directory
> >> before he can add to or delete from it.)  Adding "dmask=022"
> >> (resulting in a directory mode of 0755) and "umask=133" (resulting in
> >> a file mode of 0644) should suffice.
> >>
> >> So try changing your fstab entry to this:
> >>
> >>   UUID=E90C-65B4  /media/common vfat auto,exec,rw,flush,uid=YOUR_
> UID_HERE,gid=YOUR_GID_HERE,dmask=022,fmask=133  0 0
>
> Based on the man page for mount saying:
>
> uid=value and gid=value
>      Set the owner and group of all files. (Default: the uid and gid of
> the current process.)
>
> I experimentally deleted "uid=YOUR_UID_HERE,gid=YOUR_GID_HERE,".
> I got something closer to my mental image of how things should work.
> It required the partition be manually mounted.
> That resulted with the existing files on the partition being "owned" by
> the user triggering the mount - a near ideal situation.
> HOWEVER :<
> I managed to lose that configuration - I THOUGHT I'd saved all my
> iterations.
> I'll try again tomorrow morning. Right now I've got myself going in
> non-productive circles.
>
>
> >
> > That worked.
> > It raised some questions that I'll have to experiment with.
> > Can't just now as I'm leaving for an appointment.
> >
> >>
> >> It's probably safe to remove the "exec" and "flush" options, unless
> >> you have specific reasons to include them.
> >
> > I don't recall why I included exec.
> > However flush was explicitly recommended in a "HOWTO" I saw somewhere.
> > It specifically aimed at uses with vfat.
> >
> >>  The mount manpage has all
> >> of the details on the various options.  Search for "Mount options for
> >> fat" and "Mount options for vfat".
> >>
> >>
> >
> > More later.
> > Thanks.
> >
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list