Monthly Archives: May 2014

Public samba share with write permissions

Every now and then when setting up a Linux box in my home, I need a directory to be accessible for guest access and have write permission. However, I’m always struggling to get my setup working and usually end up searching the web for sample samba configs.

In this example I’m setting up my /home/harm/Downloads directory to be publicly accessible for guest systems. ┬áThe following configuration works.


workgroup = WORKGROUP
server string = %h server
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
usershare allow guests = yes

read only = no
path = /home/harm/Downloads
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes
create mask = 0644
directory mask = 2777

Make sure the directory has write permissions by issuing the command(s):

cd /home/harm/
chmod -R a+rwx Downloads