Link to home
Start Free TrialLog in
Avatar of fccinvest
fccinvest

asked on

folder permissions

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
Avatar of SysExpert
SysExpert
Flag of Israel image

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 !
Avatar of fccinvest
fccinvest

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of fccinvest
fccinvest

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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,
Rick
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.