(It's not the first time that I write about my problems about samba sharing. Anyway, I have tried so many different solutions that now I don't remember which was the exact initial situation, and I prefer to start a new thread describing the issue as it appear now.)
I have an usb disk attached to my Lede router.
Its NTFS partition can be shared only in read-only mode, even if I specify to share it in read-write mode.
It's not a disk issue: the partition is mounted as read-write, and when I try to write/copy a file using via ssh, I can do it without any problem.
So I think it's a permissions issue, even I was not able to solve it.
Do you have any hint/suggestion?
Here below I report my settings:
How the partition is listed by the mount
command:
/dev/sda1 on /mnt/sda1 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
The user list from /etc/passwd:
root:x:0:0:root:/root:/bin/ash
daemon:*:1:1:daemon:/var:/bin/false
ftp:*:55:55:ftp:/home/ftp:/bin/false
network:*:101:101:network:/var:/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false
dnsmasq:x:453:453:dnsmasq:/var/run/dnsmasq:/bin/false
john:*:1000:65534:newuser:/var:/bin/false
Contents of /etc/config/samba
:
config samba
option name 'Lede'
option description 'Lede'
option autoshare '1'
option homes '0'
option workgroup 'WORKGROUP'
config sambashare
option read_only 'no'
option guest_ok 'yes'
option path '/mnt/sda1'
option name 'M'
config sambashare
option path '/mnt/sda2'
option read_only 'no'
option guest_ok 'yes'
option name 'P'
option users 'john'
Contents of /etc/samba/smb.conf
:
[global]
netbios name = Lede
display charset = UTF-8
interfaces = lo br-lan
server string = Lede
unix charset = UTF-8
workgroup = WORKGROUP
bind interfaces only = yes
deadtime = 30
enable core files = no
invalid users = root
local master = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
passdb backend = smbpasswd
security = user
smb passwd file = /etc/samba/smbpasswd
use sendfile = yes
[M]
path = /mnt/sda1
read only = no
guest ok = yes
[P]
path = /mnt/sda2
valid users = john
read only = no
guest ok = yes