Translations of this page:

This is a short description to get the freenas act as a Mac-File Server using Netatalk 2.03 File Services


I assume the freenas is up and running…

Step 1 : Create User and Groups (web-interface)

  • first make a group e.g. macgroup and apply changes.
  • second add some users and give them your previously made group as primary group as well as full shell access.
  • Alternate to the above *
  • On your mac open a terminal window
  • ls -ln (this will tell you the user number associated with your account on the mac, mine was 505)
  • create your account on freenas and set your UID to the same number as it is on your mac

If you do the same with all of your accounts / macs then you can enforce permissions on the shares (see below) also the owners will show up correctly when you 'getinfo' on the mac. I wouldn't want to do this with a lot of accounts but it's fine for home or a very small office :-)

Step 2 : prepare a folder to get shared (console)

  • it is recommended that you dont share the whole volume but a folder within this volume. now we need to go to the FreeNAS and create a directory there and change access permissions. If you have SSH enabled these things can be done from remote as well off course.
  • first create a folder into your data-volume :

mkdir /mnt/yourvolume/yoursharedfolder

  • second take away root - ownerships as netatalk doesn't like this at all:

chown macuser:macgroup /mnt/yourvolume/yoursharedfolder

  • third give them access rights into the folder :

chmod 2775 /mnt/yourvolume/yoursharedfolder

(if you have other users you dont want inside there at all use 2770)

Step 3 : enable afp and configure a volume (web-interface)

  • In the share section, only the first 3 entries are really relevant (name, comment, path) the rest can be left out. I personally use the last one (upriv) as with 10.5.x clients this seems to be more compatible.

it may happen that folders on the toplevel of the share made by user A have write-protection to the user B… in this case chomd -R 2775 /mnt/yourvolume/yoursharedfolder and simply dont work on the top-level. this seems to be some umask-mac specific problem (according to the netatalk forums)

Step 3 alternate: enable NFS and configure a volume (web-interface)

  • Due to stability issues on my machine, with afp in v0.7RC1 (afp would periodically stall or dropout on large file transfers) I used NFS Manager to setup NFS mounts which were rock solid.
  • There are two primary actions to perform:
  • create a mount point on your mac
    • On mine I opened a terminal window and cd / (this changed me to the root directory)
    • I then sudo mkdir /mnt (this created the directory / folder /mnt at the top of the folder structure)
    • Then I did sudo /mnt/yourmountpoint (this created the folder where NFS would attach the share)
  • Open NFS Manager
    • click the lock and authenticate as an administrator
    • select 'Automounts from /Local/Default (on the left hand side)
    • click the plus sign to create a new mount
    • put the IP address of the freenas server in the section marked 'NFS Server'
    • Put the directory you created (on the freenas server in the 'Shares' tab, Path section of the NFS service) in the section marked 'Share Path'
    • select 'Use Predefined folder' and put the directory you created (up there) (/mnt/yourmountpoint)
    • select 'Ignore “set user ID” privledges' checkbox
    • select apply
  • Then just hit the 'Trigger selected Mount now' and it should mount in finder

Yes it sounds like more work but it is rock solid with large file transfers. I found that afs would pause or drop off after 3-400MB of a 1GB file

 
documentation/howto/apple_macintosh_setup.txt · Last modified: 2009/12/09 23:48 by olivier
 
Except where otherwise noted, content on this wiki is licensed under the following license:modified BSD license
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki