Samba Configuration - ACT 4 - Creating a Public Share
We created a samba share that required user authentication for access. Now we are going to create a share that is open to the public, no password required, just click and open. Luckily, there is not much extra, aside from what is already configured, we have to do to create a public share on our samba server. User authentication still applies, but we can select what shares to apply it to.
Here is an example of a public share I created.
Looks similar to the secure share that was create, yet with a minor difference. Look closely at the highlighted line (guest ok = yes). Straight forward, I am allowing guest users or "free access" to this share. If I wanted to apply user authentication to this share, then I would set this to "no" or remove it. Linux likes to keep you up on our toes. We still have to pay attention to the "Access Permissions" linux applies to all newly created files and folder be default. If samba and Linux do not agree on a set of standard permissions there will be difficulty accessing the share.
By default, when a new folder is created on a linux machine, it has permissions that allow owner read,write and execute, group read and execute, and everyone else read and execute. Samba looks at those permissions to determine what access controls Linux allowed in addition to the security parameters samba applies. Whatever linux says, samba must obey.
Folder with Default access permisions |
With a little modification, I included the "write" permission for both "group" a everyone else or "other". Reading left to right in the above picture, "drwx" directory, read,write and execute, are the permissions for owner.
The second set of "rwx" highlighted are the permissions for "group". Again the "write" permission or "w" has been included.
The third set of "rwx" highlighted are permissions for "others".
Any login user on a windows machine and a Linux machine can access this folder. If you are using Windows 10, open the file manager and click on "Network" in the left window pane. Windows will scan for any computers located on your local network. When it finds your Samba Linux server, double-click it. All of your provisioned shares are listed. Double-click on the "publicshare" and you and other users on your system will have access.
Though we have a samba share for public use, this should not be a folder to store public data. Instead, use this share to make resources available to the public. Each resource will have applied security to keep the public from removing or changing them. In fact we will go over that in ACT 5 - resource security.
May the open source be with you.
Comments
Post a Comment