Project

General

Profile

Actions

Advanced Configuration Options

Here are some additional options you can include in your Samba share configuration (`[ShareName]`) within the `smb.conf` file to customize the behavior of the share:

1. Comment:
- You can add a comment to describe the purpose or usage of the share for documentation purposes:

     comment = My Shared Folder

2. Browseable:
- This option controls whether the share is visible and browsable in network neighborhood lists. Set it to "no" to hide the share from network browsing:

     browseable = yes

3. Public:
- If you want the share to be accessible without authentication, you can set it as public:

     public = yes

4. Write List:
- Specify a list of users who are allowed to write (modify) files in the share:

     write list = user1, user2

5. Force User and Force Group:
- You can force a specific user or group ownership on all files and directories within the share:

     force user = user1
     force group = group1

6. Create and Directory Mode:
- These options allow you to specify the permissions that newly created files and directories will have within the share:

     create mask = 0664
     directory mask = 0775

7. Hide Files and Directories:
- If you want to hide specific files or directories from users accessing the share, you can use the `hide files` and `veto files` options:

     hide files = /somefile.txt
     veto files = /lost+found/

8. Guest Access:
- To allow guest access to the share, you can set:

     guest ok = yes

9. Access-Based Enumeration (ABE):
- ABE allows you to hide files and directories that a user does not have permission to access. This can enhance security and privacy:

     vfs objects = acl_xattr
     map acl inherit = yes
     store dos attributes = yes
     hide unreadable = yes

10. Recycle Bin:
- You can configure a recycle bin for deleted files in the share:

      vfs objects = recycle
      recycle:repository = .recycle_bin
      recycle:keeptree = yes
      recycle:versions = yes
      recycle:touch = yes

11. Guest Only Share:
- To create a share that is only accessible by guests, you can use:

      guest ok = yes
      guest only = yes

12. Printer Share:
- If you're sharing a printer, you can specify the printer driver and various printer-related options:

      printable = yes
      printer name = myprinter
      printer driver = hp4l

These are just some of the many options available for configuring Samba shares in the `smb.conf` file. The options you choose will depend on your specific use case and security requirements. Be sure to consult the Samba documentation and test your configuration thoroughly to ensure it meets your needs.

Updated by Gareth Eaton 5 months ago · 3 revisions