Confuzzeled... Mount a FreeNAS Windows share in Linux

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
Yes, I know should do NFS to make things easier. But, the Windows guys can't get to the share then.

So, how do the permissions for UNIX directory presented as a Windows share to a UNIX system with read-write?
 

lleb

Dabbler
Joined
Nov 7, 2015
Messages
24
SMB does not handle unix/linux permissions. NTFS =! ext# file system and does not use the same kind of permission scheme.

To mount a SMB share into a Linux system there are plenty of howto guides out there, but in short a few things are needed.

1. must have the SMB client software for your distribution installed.
2. create a mount point on the client (your linux system)
3. as root type: mount -t cifs IP_of_SERVER:/path/to/share/on/server /path/to/mount/point
3a. You might need to add things like username= or password= depending on how you setup the SMB share in FreeNAS

basics can be found here:

https://wiki.samba.org/index.php/Mounting_samba_shares_from_a_unix_client
 

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
SMB does not handle unix/linux permissions. NTFS =! ext# file system and does not use the same kind of permission scheme.

Yes... I know. Allow me to rephrase. What checkbox thingie in the fancy samba config gui do I need to allow everyone read-write. If it was a raw config file that I was looking at then I'd know what I need.

Also... What's with that "guest" mount checkbox option? Does it just make "guests" read and no write?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You don't need anything special for Linux clients. Just set your permissions correctly. The guest box is for smb guest access feature.
 

Dam0

Cadet
Joined
Oct 14, 2018
Messages
5
sorry to hijack this thread, but @lleb says to try
Code:
mount -t cifs IP_of_SERVER:/path/to/share/on/server /path/to/mount/point 


i get operation not permitted when logged in as root

thx,
D
 

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
sorry to hijack this thread, but @lleb says to try
Code:
mount -t cifs IP_of_SERVER:/path/to/share/on/server /path/to/mount/point 


i get operation not permitted when logged in as root

thx,
D

Actually, thank you for proving my point.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
sorry to hijack this thread, but @lleb says to try
Code:
mount -t cifs IP_of_SERVER:/path/to/share/on/server /path/to/mount/point 


i get operation not permitted when logged in as root

thx,
D
That's because that is now how you do a cifs mount.

Code:
$ sudo mount -t cifs \\\\<server IP>\\<sharename> /mnt/isos/
Password for root@\<server IP>\<sharename>:  ***********

OR

$ sudo mount -t cifs -o username=<USER>,password=<PASSWORD> \\\\<server IP>\\<sharename> /mnt/isos/

If you do it these two ways it will mount but all the files will be owned by root:root. If you want them to actually show up as owned by your user then you need to provide a uid.

Code:
$ sudo mount -t cifs -o username=<USER>,password=<PASSWORD>,uid=<local uid of user>,gid=<local gid of user group> \\\\<server IP>\\<sharename> /mnt/isos
 

tfjad

Dabbler
Joined
Nov 1, 2016
Messages
12
Also, depending on the Linux distro, the distro's Samba may default to only connecting to SMB1 shares. To allow Samba to connect to higher version shares, you need to have a line like client max protocol = SMB3 in the [global] section of your smb.conf file. In Linux this file usually is at /etc/samba/smb.conf
 
Top