:: Re: [DNG] unstable ownership of mou…
Página Principal
Delete this message
Reply to this message
Autor: aitor
Data:  
Para: dng
Assunto: Re: [DNG] unstable ownership of mount point
Hi,

On 2/3/24 16:03, Lorenz via Dng wrote:

> Il giorno sab 2 mar 2024 alle ore 15:04 Haines Brown via Dng
> <dng@???> ha scritto:
>> How can the mount command change ownership of a mount point?
> If I remember correctly, vfat does not understand permission so files are
> always owned by root:root ; even if you manage to change the permission of
> a file the filesystem doesn't know where to store this data, so the the setting
> is not persistent.
>
> but umask usually works for me, try
>
> $ sudo mount -o umask=000 /dev/sdc1 /media/working


As an alternative to Lorentz's suggestion, you can set the ownership of the target directory
by passing uid and gid to the mount command.

For example:

$ sudo mount -o uid=1000,gid=1000 /dev/sdc1 /media/working

However, only filesystems which do not support Linux permissions like vfat have an attribute for
ownership/groupship: uid=value and gid=value. See the mount manpage.
.
In case the filesystem does support Linux permissions, you can set the ownership before running
the mount command, and pass the following arguments to it:

$ sudo mount --rw /dev/sdc1 /media/working


Cheers,

Aitor.