More helpful FreeNAS links/guides/howtos:
http://www.freenas.org
http://developer.novell.com/wiki/index.php/HOWTO:_Install_FreeNAS
http://dailycupoftech.com/howto-install-freenas/
http://www.packtpub.com/article/installation-freenas
This guide in PDF
FreeNAS Guide Intentions:
When I first installed FreeNAS I knew enough to get around a linux environment, but was semi-new to the Linux/BSD User/Group permission and ownership of files and directories (aka folders for some windows users).
I had to get the ownership and permissions right for my SAMBA authentication to work. FreeNAS is an easy to install/setup point and click operating system/software, but does require some manual configuration if you want users to be restricted to certain directories.
Default SAMBA sharing allows ALL users to be able to access the share. I don't want every user into my shares even though it is local and there are only a couple of users on this LAN (my wife and i).
I wrote a small text based guide on the FreeNAS.org forums when someone PMed me and requested they wanted a guide with screenshots, so... Here it is, free of charge, BUT I WILL GLADLY TAKE ANY DONTATIONS. The right hand side has a link to my paypal if you would like to donate.
jkl:
Step 1:
I’m also assuming you already know how to install freenas, and add a disk. Now let’s get some tools! I highly recommend downloading Putty if you are on Windows. Putty is a free telnet/ssh client.
Putty is available in the downloads section.
http://www.billrice.info/downloads.php
Step 2:
Now let us add a user!
The best way for your FreeNAS machine to be semi-secure is to create users with groups and give them permissions to only things you want them to have access to. Lets first start by creating an administrator “type” user by adding him to the main group, “wheel”.

Click on the bottom right hand + mark to add a user.

As you can see I added the user bill and assigned him to the Primary group “wheel”. This is the default group FreeNAS uses when adding Disks. Don’t forget that users can belong to MULTIPLE groups. Then click Add.

I’m keeping the default groups FreeNAS already has. Next I’m going to add a GUEST type user.

Once all of the users are added you can click the Apply Changes button for the newly added users to be created.

Step 3:
Now we have our users created. Let’s start to get some services going. First we need SSH enabled. Don’t think you downloaded that tool for nothing! Go to Services -> SSH.

Let’s put a check mark in Enable, I like to be able to log in as root user (you may not want to) so my options look like this. I have the Private Key and extra options BLANK, nothing in there.

Now click on the “Save and Restart” button. You can now SSH into the unit, but we may not need it quite yet! You can also do command line things from Advanced -> Command, but I personally don’t like it.
Step 4:
Why do most people get FreeNAS? I’m sure people have their reasons, but I feel as if the #1 reason is for SAMBA!! People want to share natively from Windows!! Let’s get SAMBA enabled so we can start dropping files. Samba is also known as CIFS or SMB.

Some people set their Authentication method to “Anonymous” to get it working. You DO NOT want to do this if you have private information you don’t want Joe Schmoe to get into. People usually use this when their “Local User” type doesn’t work properly, but I will show you how to make it work. It’s all about the permissions!
I believe the only thing I’ve changed from the default settings is the Enable large read/write because I was having slow transfers.


Once you get everything setup like this and enabled, click “Save and Restart”.
Step 5: Add a share and browse to it.
With Samba enabled, lets add some shares so you can read/write to it. Click on the “Shares” tab in CIFS and click on the + mark to add a share.

I’m going to name it, set a comment so I know what it is, and browse for the path.


Then click add and Apply Changes in the shares screen.
NOTE*: I added a share for a “pre-created” directory. If you share the entire drive, then you will more a better success rate. See pre-created directories later on in this guide.
You are now ready to start adding files to your share!! You can browse to your share by opening a my computer window and putting in \\x.x.x.x where x.x.x.x is the IP Address of your FreeNAS server, then press enter to see your share. Mine happens to be 192.168.4.250.

You can now double click on the share name, you will be prompted for a username/password. Use the username/password you used when creating your users!
Step 6: Troubleshooting with Putty
WAIT? It may or may not work? This is where permissions come into play and the Putty tool can come in handy.
Open Putty, Put in the IP Address of your FreeNAS server, and put a tick mark next to SSH, then click Open. The default port # is 22.

It will prompt you for a username and password. You can either enter as the root user (use at caution) or one of the users you created. If you use a user that you created, it MUST have admin rights. We’ll enter in as the “root” or admin user, but this is only needed to change permissions. The passwords is the same as your FreeNAS password.

Now we need to get to where our drive/folder is. Type in cd /mnt/drivename/ . If you don’t know what your drive name is, you can see what it may be by typing ‘cd /mnt/’ then ‘ls –l’. As you can see my drive name is “SNDATA”

The ‘drwxrwxrwx’ is the permissions on the left hand side that we setup when adding our disk. Please make sure yours looks like this.
If you shared the entire disk, then your Samba shares should be working. If you shared a separate directory inside, we’ll need to check those permissions. Type ‘cd SNDATA’ where SNDATA is the name of YOUR directory to go in and see what we have inside. Then we can type ‘ls –l’ again.

So you can see here, the “bill_localbackups” belongs or is OWNed by the user bill and is part of the group wheel. My wifes folders are owned by her ‘amber’.
The far left items for permissions go like this
d for directory
rwx , this is USER read, write, execute permissions
rwx, this is GROUP read, write, execute permissions
rwx, this is PUBLIC read, write, execute permissions
ANY user has the ability to see the bill_localbackups folder. Only members of the “guest” group or the user “amber” can read/write to the amber_localbackups folder (That means bill is locked out since I’m not a part of guest, doh!). Members of the group “wheel” can read/write in the “amber” folder (the bill user can see that since he is a part of the wheel group)
If you can’t get into your SAMBA folder, is the username/password you are using have permissions to the folder you are trying to access? Does the folder you are trying to access exist? You can do a few things. 1.) Share the whole disk in the SAMBA setup (this will share the entire disk to EVERYONE by default. When a new folder is created in the windows browser, it will be owned by that user) 2.) Manually create a new folder and/or manually set the permissions.
I like to manually create the initial folders so you could in essence type in Putty…
cd /mnt/SNDATA/ (which is my disc, replace SNDATA with yours)
mkdir bill_localbackups (This creates a new directory/folder called bill_localbackups)
mkdir amber_backups (This creates a new directory called amber_backups)
chown –R bill:wheel bill_localbackups (This sets the OWNER to “bill” and the group to “wheel”).
chown –R amber:guest (This sets the OWNER to “amber” and the group to “guest” )
You can now edit or create a SAMBA share your newly created directories.
To go over permissions again I’ve attached this screen shot.

Mine happen to at the moment happen to ACCIDENTALLY have all users be able to read bill_localbackups. I should probably change this. If I did change it, I would change the permissions with the CHMOD command.
chmod –r 770 bill_localbackups
This would recursively (-r means recurse into subdirectories too) and change all permissions within directory to ‘drwxrwx---‘ .
770 = rwxrwx---
777 = rwxrwxrwx
700 = rwx------
I recommend googling or reading about the CHMOD command to determine the best permissions for you FreeNAS setup. The permissions and groups are all dependent upon how you want to use it.
http://www.corantodemo.net/doc/chmod-doc.shtml