• [SOLVED] Re: How to change ownership of subdirectories under /media

    From Haines Brown@21:1/5 to David on Sun May 4 14:10:01 2025
    Thank you , David. My problem was a simple blunder, but your respose was usefully informative.

    On Sat, May 03, 2025 at 02:12:23PM +0000, David wrote:
    On Sat, 3 May 2025 at 11:09, Haines Brown <haines@histomat.net> wrote:

    Now to assist you, here's an actual example cut and pasted from the machine I'm using right now.

    I have a USB key with vfat filesystem with label "SDS814XHD" as shown here:

    $ lsblk -f | grep SDS814XHD
    sdc vfat FAT16 SDS814XHD 843A-B464

    Here's 'grep' showing the relevant line in /etc/fstab that allows that particular key to be mounted by any user:

    $ grep SDS814XHD /etc/fstab
    LABEL=SDS814XHD /mp/sds814xhd vfat noauto,gid=share,dmask=7007,fmask=7117,shortname=winnt,quiet,user

    Note in that line the use of the 'user' option as described in 'man mount'.

    Here's what happens when a plain user 'david' mounts the USB key:

    $ whoami
    david

    $ mount -v LABEL=SDS814XHD
    mount: /dev/sdc mounted on /mp/sds814xhd.

    User david owns the files:

    $ ls -l /mp/sds814xhd
    total 32
    drwxrwx--- 3 david share 16384 1980-01-01 11:00 SDS814XHD
    drwxrwx--- 2 david share 16384 2024-11-15 19:25 SIGLENT

    $ umount -v LABEL=SDS814XHD
    umount: /mp/sds814xhd (/dev/sdc) unmounted

    I hope that example helps you to do what you need.
    If you reply, please make sure that your reply goes to the
    list, not to me. Thanks.


    --
    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Haines Brown on Sun May 4 16:20:01 2025
    Hi,

    On Sun, May 04, 2025 at 08:03:39AM -0400, Haines Brown wrote:
    Thank you , David. My problem was a simple blunder, but your respose was usefully informative.

    It would be helpful to say what the blunder was so that other people
    who find this thread by search later on may not be left wondering if
    they, too, made the same unknown error.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)