Creating shares
One 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.
- Go to Storage.
- Next to a Pool, click
> Add Dataset.
- Enter a Name (e.g. media).
- Add a Comment (e.g. Media content stored on FreeNAS).
- Choose a Share type (e.g. SMB).
- 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.
- Next to your newly created Dataset, click
> Edit ACL.
- For the Default ACL options drop-down select RESTRICTED.
- 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.
- Next to your newly created Dataset, click
> Edit ACL.
- Change the User to one that you've created (e.g. steven).
- Change the Group to one that you've created (e.g. staff).
- Click SAVE.
Sharing
Now that we have a dataset, with configured permissions, we can enable it for sharing.
- Go to Sharing > Windows Shares (SMB).
- Click the Add button.
- In the Path area, browse to your newly created dataset.
- Enter a Name for the share (e.g. media).
- Click SAVE.
- 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.
- Start by creating a Dataset called 'home', with a share type of SMB.
- Next to your home Dataset, click
> Edit ACL.
- For the Default ACL options drop-down select HOME.
- Click SAVE.
- Next to your home Dataset, click
- Add the Dataset as a Windows Shares (SMB).
- Enter a Name for the share (e.g. home).
- Click the checkbox to Use as a home share.
- 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.