Please help setting up SMB

Status
Not open for further replies.

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
So I first created a Windows share and I was able to access it in Windows but I could not copy any files to it.

Now when I try to access my FreeNAS server, Windows tells me it cannot access it but can still see it.

I cannot find some of the things in FreeNAS that are talked about in the 10.4 section of the sharing guide. I cannot find where the add user wizard is.

cifs3.png


I don't really want to have "users". I just want to be able to browse my FreeNAS server as a network drive ie "\\Media-Primary\" not as "\\Media-Primary\user1\"
 

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
I am starting to get pissed off.

I created a group. The group is owner of my dataset. I created a user. Added the user to the group. My share points to the dataset. I still cannot access my server.

In Windows, I went to map network drive, I entered "\\IP\Media", I check the box that said "Connect using different credentials", I entered the name of the user I created in FreeNAS and the password I created for that user.

Will someone please point out to me what my dumbass self if not doing correctly. I have watched that video several times and cannot figure out what I am doing wrong.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You should try thinking what information would actually help us help you. Something like the error message is a good start. Starting over with a new share is another good idea, make sure to document each step you make and post it. Do you have any of the guest access settings checked? What OS and version is your client using?
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
You need to recursively own the share directory via cli: chown -R nobody:shared /mnt/Music
  • If you've done all that
    • Verify your PC and router firewalls are not blocking ports:
      • UDP: 138, 139
      • TCP: 139, 445
    • Ensure your PC and FreeNAS box are apart of the same workgroup:
      • FreeNAS: Services -> SMB -> Workgroup
      • PC: Control Panel\All Control Panel Items\System - Advanced System Settings - Computer Name - Change - Workgroup

  • I also always recommend adding Windows shares by hostname, not IP (for example: \\freenas\Music)
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
1. Don't ever share your root dataset. You need to create a new dataset for that. You probably should delete your volume and start over because you changed it to Windows permissions and that will break lots of stuff.
2.i thought you said you created a user and set the owner of the dataset to today user. Currently you are using the nobody user that is built into freenas.
3. Watch the video and do exactly what he does. Don't try to interpret it and make it your own. Permissions don't work like that. You either do it right or you don't.
4. After you rebuild everything check the set permissions recursively box for your new dataset.
Sent from my Nexus 5X using Tapatalk
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You need to recursively own and set permissions on the share directory via cli: chown -R nobody:shared /mnt/Music ; chmod -R 470 /mnt/Music
  • If you've done all that
    • Verify your PC and router firewalls are not blocking ports:
      • UDP: 138, 139
      • TCP: 139, 445
    • Ensure your PC and FreeNAS box are apart of the same workgroup:
      • FreeNAS: Services -> SMB -> Workgroup
      • PC: Control Panel\All Control Panel Items\System - Advanced System Settings - Computer Name - Change - Workgroup

  • I also always recommend adding Windows shares by hostname, not IP (for example: \\freenas\Music)
No you can't chown stuff when it's set to Windows permissions. You will get a permission denied error.

Sent from my Nexus 5X using Tapatalk
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
No you can't chown stuff when it's set to Windows permissions. You will get a permission denied error.
No, you won't... please issue a chown command on a SMB share to verify =] (See screenshot)
 

Attachments

  • Screenshot.png
    Screenshot.png
    620.9 KB · Views: 532
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
No you can't chown stuff when it's set to Windows permissions. You will get a permission denied error.
I think it's chmod that will do this, and the error says "operation not permitted".

But you're right that sharing (and especially changing permissions) on the pool root is a bad idea and very likely to bork stuff.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
yeah, chmod should never be executed against a SMB share directory as it will royally screw the ACLs in Windows... I clearly wasn't paying close enough attention to what I wrote (my bad, post corrected)
 

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
You need to recursively own the share directory via cli: chown -R nobody:shared /mnt/Music
  • If you've done all that
    • Verify your PC and router firewalls are not blocking ports:
      • UDP: 138, 139
      • TCP: 139, 445
    • Ensure your PC and FreeNAS box are apart of the same workgroup:
      • FreeNAS: Services -> SMB -> Workgroup
      • PC: Control Panel\All Control Panel Items\System - Advanced System Settings - Computer Name - Change - Workgroup

  • I also always recommend adding Windows shares by hostname, not IP (for example: \\freenas\Music)

1. Why do I need to run CLI commands? The dude in the video didn't. Also, the guy said that you only need to set permissions recursively if there is data in the dataset and there is not so I did not.
2. I am not using any firewalls.
3. They are.

1. Don't ever share your root dataset. You need to create a new dataset for that. You probably should delete your volume and start over because you changed it to Windows permissions and that will break lots of stuff.
2.i thought you said you created a user and set the owner of the dataset to today user. Currently you are using the nobody user that is built into freenas.
3. Watch the video and do exactly what he does. Don't try to interpret it and make it your own. Permissions don't work like that. You either do it right or you don't.
4. After you rebuild everything check the set permissions recursively box for your new dataset.
Sent from my Nexus 5X using Tapatalk

1. I guess I am not understanding what a dataset is. I just want to have access to my entire ZFS pool not just a directory or a subset of my pool.

Why do I need to delete my pool? Cant I just change the share and permission type to UNIX, it gives me that option?
2. I did. Just like in the video. The owner user of the dataset is nobody and the owner group is "shared" of which my user account is an auxiliary member.
3. I did watch it and I still don't understand what I am doing differently.
4. See above.

SMB Settings
BMG4hO7.png
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Protocol versions should be set to the default. Don't change the defaults unless you know what it does. Minimum version should be the lowest possible.

Sent from my Nexus 5X using Tapatalk
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@Poppa You're changing settings in which you don't have a full understanding of what they do... I would recommend taking the time to google a settings option before changing it to determine what exactly it's for, else you're shooting yourself in the foot by compounding your original issue.

Your issues are due to misconfigured settings or a misconfigured local network, as Samba is rock solid... I would recommend starting anew, going step by step, and not changing a setting if you don't understand what it does (google first if unsure).
  • For example, the NETBIOS name is incorrect and will be the hostname [first part before the dot to be specific]... in your case, freenas.local
    • The second half, freenas.local, will be the local domain set by your router.
 
Last edited:

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
Ok. I got it working. I changed the "server minimum protocol" to SMB2 and it is now working. I was going to say that I am an idiot but as you can see, that has already been established.
 

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
So I changed the permissions of "/mnt/Music" to UNIX since it is apparently a bad idea to have Windows permissions on the root directory. I created a new dataset for the different kinds of content I may be storing and mapped them to it's own drive. Each new sub dataset has Windows permissions.

My share still points to "/mnt/Music". Should I make a separate share for each sub dataset?

The only problems I am having is that Windows shows two network locations for my freenas server. Is there any way to fix/change/hide FREENAS so only the other shows?
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Please don't use links to imgur or other third-party hosting sites--these forums are perfectly capable of self-hosting images (you can even paste them into the body of your message), and then there are no future issues with stale links as can often happen with third-party hosting.
 
Status
Not open for further replies.
Top