On Sun, 20 Oct 2024 19:34:28 +0200 Gilles via samba <samba at lists.samba.org> wrote:> On 20/10/2024 17:07, Rowland Penny via samba wrote: > >> Unless it has changed, curl only supports SMBv1 and it is turned > >> off by default on Samba. > > Too bad. That takes care of question #1. > > Are those the wrong settings to force new files to be saved with a > given user and the given access rights? A new file is still root:root > and 655 > > =========> [sdcard] > path = /mnt/sdcard > guest ok = yes > writeable=yes > browseable=yes > > force user = www-data > force group = www-data > ;? create mask = 0644 > force create mode = 0644 > ;? directory mask = 0755 > force directory mode = 0755 > =========> >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. Rowland
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.
I found how to get Samba to create files on a removable device formated as VFAT 1) as the account set by "guest account", and 2) with rw r r: =================cat /etc/fstab #Linux takes care of converting literals into matching uid/guid in /etc/passwd UUID=439E-8C29 /mnt/sdcard???? vfat uid=www-data,gid=www-data,dmask=000,fmask=0133,user?????? 0 0 systemctl stop smb umount /mnt/sdcard chown -R www-data:www-data /mnt/sdcard ll /mnt/ systemctl daemon-reload mount /mnt/sdcard/ mount systemctl start smb c:\>copy test.txt \\linux\share ll /mnt/ ================= https://unix.stackexchange.com/questions/87494/can-fstab-options-uid-and-gid-be-the-user-group-name-or-must-they-be-numeric