folder permissions

Posted on 2008-11-09
Last Modified: 2013-12-02
I am not a linux programmer, I setup freenas on a atom board with no problem, created the raid and all is well.  I can access the files across my network and everything works.  So I created another freenas for the shop with the same hardware and software, created the raid and the whole 9 yards exactly the same.  This one works until you try to access the folder( \\server) it comes up and lets you log in but you can not access the fileserver folder within.  It kicks an error back saying "you might not have permission" and then says "network path not found"  I have been through all the settings from access users to samba settigns and can not find anything wrong other than I can not access the fiolder ???

Any suggestions ?  Bear in mind i am not very familiar with Linux or shell access, so if you start saying shell to root and chmod I need step by step.

Thanks, Rick
Question by:fccinvest
    LVL 63

    Expert Comment

    1) At home are you using a workgorup or DOmain.

    2) What about at work ?

    If they are not the same setup, the SAMBA and permissions will need to be setup differently to allow access.

    I hope this helps !

    Author Comment

    I have been trying to get the second machine working from my house, so both seetings are the same.
    Under general it i sset to fileserver and local, under samba it i sset to workgroup home.

    Accepted Solution

    I found the problem was in the samba share path, thanks anyway for the help.

    Author Comment

    I thought I would elaborate on this as I have had many ask how to make the freenas users and groups work.  So here goes in step by step format:

    Provided you have installed Freenas and configured your drives, created a mnt point
    and are ready to create directories and shares.

    Step 1:
    Under Services and cifs/smb enable SAMBA and set authentication to "local user".  
    Set Netbios name for example     "fileserver"  (this is what windows will access)
    Then set your workgroup and that is it, save and restart.

    Step 2:
    SSH to your box to your /mnt/share/ directory ... "fileserver"
    Create your directories with the mkdir command "mkdir public"  "mkdir accounting"  "mkdir rick"  
    and then you need to change the permissions "chmod 777 public"  "chmod 770 accounting"
    "chmod 700 rick"  In this example public is open to all to read write and execute, accounting is open to anyone in the accounting group to read write and execute but no one else, & rick is only open to rick.  

    You can type ls -l and see a list of these directories and they should show "permissions, owner, group date and name of directory"  like this...  drwxrwxrwx  2 root  public       512 Mar 22 18:06 public
    The example shows permission 777,  owner root, group public, date, and directory name.

    Step 3
    Back in freenas, go to access and users and groups.  Go to group tab and set up group for accounting and any other groups you need.  Public is not needed as it is set to 777

    Now switch over to users and create users and set primary group like accounting, set additional groups for this user (can be multiple) set home directory to /mnt/fileserver or netbios name.

    Step 4
    Back to service under cifs/smb go to the shares tab and setup shares for all directories you made, assign same name as directory you created, path to that directory for example (/mnt/fileserver/accounting/), set browseable, set permission inheritance,
    then under auxilary parameters set group and user.  Use command
    "force group = accounting"for group and "valid user = @accounting" on separate lines, and save.

    You now will be able to access under windows by the "start  run  \\fileserver"  
    command and have a working user and group structure.  

    Hope this is helpful,

    Author Comment

    In the above post I left out one part of step 2, after chmod you need to change group as below...
    Then change group "chgrp public public"  "chgrp accounting accounting"  and so on.

    Sorry about that but I know this works and was a big relief to finally get done.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
    AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
    This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now