[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8031
  • Last Modified:

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
0
fccinvest
Asked:
fccinvest
  • 4
1 Solution
 
SysExpertCommented:
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 !
0
 
fccinvestAuthor Commented:
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.
0
 
fccinvestAuthor Commented:
I found the problem was in the samba share path, thanks anyway for the help.
0
 
fccinvestAuthor Commented:
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
0
 
fccinvestAuthor Commented:
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.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now