Creating shares

freeNASOne of the main reasons for building a FreeNAS server is to provide file sharing services.  This article describes how to get started with this.  Start by logging on to FreeNAS.


Datasets

First we need to create a dataset before we provide a share.

  1. Go to Storage.
  2. Next to a Pool, click3dots> Add Dataset.
  3. Enter a Name (e.g. media).
  4. Add a Comment (e.g. Media content stored on FreeNAS).
  5. Choose a Share type (e.g. SMB).
  6. Click SAVE.

There is now a dataset called media inside your pool. The data is case-insensitive, which would support an SMB share.

 

Access Control Level

Once you have created a Dataset, you will typically want to edit the access permissions. I find this works best in a two stage process.

  1. Next to your newly created Dataset, click3dots> Edit ACL.
  2. For the Default ACL options drop-down select RESTRICTED.
  3. Click SAVE.

This will give full access to the user of the share, and modify permissions to a group associated with the share. Next we will change the user and group associated with the share.

  1. Next to your newly created Dataset, click3dots> Edit ACL.
  2. Change the User to one that you've created (e.g. steven).
  3. Change the Group to one that you've created (e.g. staff).
  4. Click SAVE.

 

Sharing

Now that we have a dataset, with configured permissions, we can enable it for sharing.

  1. Go to Sharing > Windows Shares (SMB).
  2. Click the Add button.
  3. In the Path area, browse to your newly created dataset.
  4. Enter a Name for the share (e.g. media).
  5. Click SAVE.
  6. Click Yes to enable the SMB service (if not already enabled).

 

Home directories

A share can be created that is to be used as a home directory for any users that you add to the system.

  1. Start by creating a Dataset called 'home', with a share type of SMB.
    1. Next to your home Dataset, click3dots> Edit ACL.
    2. For the Default ACL options drop-down select HOME.
    3. Click SAVE.
  2. Add the Dataset as a Windows Shares (SMB).
    1. Enter a Name for the share (e.g. home).
    2. Click the checkbox to Use as a home share.
    3. Click SAVE.

Now when you create a new user and select this shared home directory, a home directory will be created, with the same name as the username (lowercase).

 

Thanks for visiting.