On Mon, 21 Oct 2024 13:47:40 +0200
Gilles via samba <samba at lists.samba.org> wrote:
> On 21/10/2024 10:55, Rowland Penny via samba wrote:
> > It all depends on what filesystem is on the sdcard, if it is a
> > Windows filesystem (vfat etc), then what you see on Linux is a
> > figment of the mount command, but if it is a Linux filesystem (ext4
> > etc), then there is something wrong.
>
> Ah, didn't think of the filesystem.
>
> So it's either making the SD card directly accessible on a Windows
> host or having files saved with the right owner + rights.
>
> Thank you.
>
>
Not entirely sure what you are asking here, but a host connecting to
share via SMB never sees the shares directory or filesystem, it just
sees the SMB data stream, so it doesn't care what the filesystem is.
What does matter is that the filesystem is known to the computer it
resides on, Linux has some knowledge of Windows filesystems, but
unfortunately cannot set permissions on one. What this means is, if
your SD card is using a non native Linux filesystem, then 'mount' can
appear to mount the card as a directory, but the ownership &
permissions are purely made up by the mount command.
If you require to be certain of setting the correct ownership &
permissions on an SD card, then it must be formatted with a Unix
filesystem e.g. ext4, but then it probably wouldn't be compatible with
Windows i.e. If you plugged into a Windows machine, it wouldn't be
readable by Windows.
In my opinion, you shouldn't expect to be able transfer data on an SD
card or USB drive and retain ownership & file permissions.
Rowland