On Sun, 20 Oct 2024 16:42:12 +0200
Gilles via samba <samba at lists.samba.org> wrote:
> Hello,
>
> I have a couple of questions for a guest only, stand alone server:
>
> 1. Windows Explorer can copy a file to Samba, while curl fails:
>
> =========> root at debian# ll /mnt/sdcard/
> drwxrwxrwx 2 root root???? 8192 Jan? 1? 1970 ./
> =========> root at debian# cat smb.conf
> [global]
> workgroup = WORKGROUP
> netbios name = debian
> security = user
> server role = standalone server
> map to guest = Bad User
> guest account = www-data
>
> [sdcard]
> path = /mnt/sdcard
> guest ok = yes
> writeable=yes
> browseable=yes
> force user = www-data
> force group = www-data
> =========> #reload smb.conf
> root at debian# smbcontrol smbd reload-config
> =========> C:\>curl.exe -T test.txt smb://debian/sdcard/test.txt -u
> www-data:www-data curl: (7) Could not connect to server
> =========> root at debian# tail -f /var/log/samba/log.smbd
> [2024/10/20 16:14:43.056264,? 2]
> ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
> ? Registered MSG_REQ_POOL_USAGE
> =========>
> 2. In smb.conf, force use/group is ignored (file is still copied as
> root:root); I'd also like that files be saved as 644 (rw r r) instead
> of 655 (rw rx rx):
>
> =========> root at debian# ll /mnt/sdcard/test*
> -rw-r-xr-x 1 root root???? 9062 Mar 21? 2023 test.txt*
> =========>
> Thank you.
>
>
Unless it has changed, curl only supports SMBv1 and it is turned off by
default on Samba.
Rowland