I'm trying to make a simple read only public share using samba. What am I doing wrong? The rest of the samba.config is stock.

  path = /home/root/share
  public = yes
  writable = no
  printable = no
  browseable = yes
  guest ok = yes
  readable = yes
  • 2
    What is the actual problem / errors you see? What do logs show? Commented Jul 27, 2016 at 20:34
  • The "actual problem" is that I cannot browse this folder from my windows computer or map to it. I can see the server under network and when I click on it I see the folder but when I click on the folder I can't get access to the contents. Windows gives says it cannot access the share. I'll check logs and post anything relevant in a few
    – dpetican
    Commented Jul 27, 2016 at 20:38
  • The logfiles are empty. I removed the writable and readable parameters and replaced them with read only = yes
    – dpetican
    Commented Jul 27, 2016 at 20:49
  • If the log files are empty, that suggests that smbd/nmbd are not running.
    – steve
    Commented Jul 27, 2016 at 21:24
  • Yes it is running but this is part the output from /etc/init.d/samba status: 'Active: active (running) since Wed 2016-07-27 21:42:04 BST; 1h 11min ago' 'Jul 27 21:53:40 minibian smbd[837]: pam_unix(samba:session): session closed for user nobody'
    – dpetican
    Commented Jul 27, 2016 at 21:54

1 Answer 1


Your posted configuration looks ok, other than the readable = yes line. testparm shows that to be an unknown parameter on my system. This simplified version works for me:

[test] path = /home/user/share read only = yes guest ok = yes

Just a reminder, if you make changes to your smb.conf file be sure to restart smbd.

If the directory is visible in Windows but not accessible then that sounds like a permission issue. Make sure the directory has the correct permissions. You should have read and execute permissions set for all users. To accomplish this you can do chmod a+rx /home/<user>/share (replace <user> with a valid user home directory).

I think the real issue is the location of share. If /home/root is root's home directory (mine is at /root, not /home/root) it should be set to have read, write and execute permission only for root. If this is the case I would recommend not putting the share in that directory. One appropriate place for a public read only share would be in /srv. This is from FHS:

/srv : Data for services provided by this system


This main purpose of specifying this is so that users may find the location of the data files for particular service, and so that services which require a single tree for readonly data, writable data and scripts (such as cgi scripts) can be reasonably placed. Data that is only of interest to a specific user should go in that users' home directory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .