help request samba share

i have webmin running on my odroid HC1
i made a share but i am unable to write on it
my config file:

security = user
max log size = 1000
panic action = /usr/share/samba/panic-action %d
syslog = 0
syslog only = no
server string = %h server
workgroup = ENTERPRISE
pam password change = yes
obey pam restrictions = yes
printcap name = /dev/null
passdb backend = tdbsam
load printers = no
log file = /var/log/samba/log.%m
passwd chat = Enter\snew\s\spassword:* %n\n Retype\snew\s\spassword:* %n\n password\supdated\ssuccessfully .
encrypt passwords = true
disable spoolss = yes
unix password sync = yes
os level = 20
map to guest = bad user
dns proxy = no
passwd program = /usr/bin/passwd %u

max connections = 16
valid users = dietpi,perco
create mode = 775
directory mode = 775
path = /mnt/dietpi_userdata
write list = perco
comment = DietPi Share
writeable = yes

create mode = 775
valid users = perco
writeable = yes
comment = HDDShare
path = /mnt/DietpiHDD
write list = perco
directory mode = 775

please some help with this

can you try to login as user perco on OS level (command line) and do the following

touch /mnt/dietpi_userdata/test.file
touch /mnt/DietpiHDD/test.file

Both files seems to be empty when i open them as .txt
i discovered that i can change permissions via File manager
did resolved my issue when i changed the check in the box others in ‘write’

why this is not default when making shares i still don’t know

yes files you are creating using touch are empty. It’s just a test about permissions if the user is able to write down something on OS level.

But as I understood you found the correct setting and now able to write files using SAMBA?

Yep, i’ve learned today
but i am still confused why the configuration thrue Webmin didn’t (completely) work

anyway, i hope this post helps someone in the future

Well Webmin is working as designed. The thing is that these are 2 different topic. On Webmin you managed and configured the SAMBA access. However in addition to that, you would need to ensure that the samba user is able to write to the files/directories. This is a pure access/permission topic an not something that will be managed due to a samba configuration.

By default access to specific folder/files is given to the owner of these folder/files only, to protect not authorized activities. On /mnt directories usually DietPi user is the owner. Same for mounts of external devices. To give access to someone else, like a different “samba” user, you usually add these user to the same group and add write permission for that group. This way you still have protected the files to be accessed by everybody. In your case, what you have done now is to grant permission to everybody. This is the easiest way but not the moste secure. However, if you can ensure that your system can’t be accessed by someone else from outside world, you should be fine. :wink: