{"id":84,"date":"2011-11-05T19:53:33","date_gmt":"2011-11-05T23:53:33","guid":{"rendered":"http:\/\/tblog.myriad.ca\/?p=84"},"modified":"2018-02-11T14:05:34","modified_gmt":"2018-02-11T19:05:34","slug":"creating-permissions-users-on-freenas","status":"publish","type":"post","link":"https:\/\/myriad.ca\/index.php\/2011\/11\/05\/creating-permissions-users-on-freenas\/","title":{"rendered":"Creating permissions &#038; users on FreeNAS"},"content":{"rendered":"<p>Here is a good way to set up users and groups with permissions on <a href=\"http:\/\/sourceforge.net\/projects\/freenas\/files\/FreeNAS-7-Stable\/0.7.2.8191\/\" target=\"_blank\" rel=\"noopener\">FreeNAS<\/a>.\u00a0 This how-to assumes that you have the FreeNAS server set up properly and that you have mounted your various drives&#8217; and set up the directories you need.\u00a0 Start by creating your own user account and joining it to the &#8216;wheel&#8217; group. You should be the only user in that group.<\/p>\n<p>In this example I am going to create a user that can access the &#8216;NAS_downloads&#8217; directory with read\/write\/execute permissions (rwx) that is owned by &#8216;root&#8217; and which the public has no access to.\u00a0 Go into the FreeNAS web browser and create the group &#8216;media&#8217; and add your media user to it. Next, we are going to give &#8216;root&#8217; ownership of all files on our &#8216;\/mnt &#8216; drives:<\/p>\n<ul>\n<li>Open a terminal using <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\" target=\"_blank\" rel=\"noopener\">Putty<\/a> and ssh into the freeNAS server.<\/li>\n<li>Enter the following commands into the terminal:<br \/>\n# cd \/your_drive<br \/>\n# \u00a0chown -R root:wheel .<\/li>\n<li>If you have more than 1 drive in your FreeNAS server (I have 5) then repeat the previous command for each drive.<\/li>\n<li>Change to your media directory:<br \/>\n# cd \/ NAS_downloads<\/li>\n<li>Execute the command:<br \/>\n# chmod -R 775<\/li>\n<\/ul>\n<p>Now you are finished. Your &#8216;Media&#8217; user only has read\/write access to the NAS_downloads directory while you have all access to everything.\u00a0 You can create other users as needed by repeating the command steps on the new directories.\u00a0 There is a good permissions calculator <a href=\"http:\/\/www.javascriptkit.com\/script\/script2\/chmodcal.shtml\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a good way to set up users and groups with permissions on FreeNAS.\u00a0 This how-to assumes that you have the FreeNAS server set&#8230;<\/p>\n","protected":false},"author":2,"featured_media":6004,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[167],"tags":[],"class_list":{"0":"post-84","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-freebsd"},"_links":{"self":[{"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":2,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":6003,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions\/6003"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/media\/6004"}],"wp:attachment":[{"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myriad.ca\/index.php\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}