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
Rationale
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.