Can't access cifs shares in windows 10

Status
Not open for further replies.

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I have done a clean install of FreeNAS 9.3, then imported my volumes, set the cif shares, but although FREENAS is showing in the network , I can't access it

My volumes are like this:
/mnt/WinShare
/mnt/cctv
/mnt/Backup_Data

How can I get this/freenas/WinShare etc
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Yes without any joy
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Too bad, I've seen a lot of CIFS threads resolved by reboots.

If @anodos shows up, he'll be asking to see your samba configuration (or just a debug file - System | Advanced | Save Debug).
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I tried that after a reboot but windows cannot access \\192.168.0.17.

In changing permissions of each share I have the owner user as root, and owner group as nobody, so what have I missed.

I have FreeNAS 9.10 installed now, but when I was using FreeNAS 9.3 there was no problem.
 
Last edited:

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Sorry but how do I read the smb4.conf file; I see it in a shell, but don't know how to print/list/read it
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I can't see on your profile how to actually pm you. I can post a message but can't upload the debug file. I must be having one of those days here today.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
I can't see on your profile how to actually pm you. I can post a message but can't upload the debug file. I must be having one of those days here today.

Click on "Inbox" then "Start a new conversation".
Capture.PNG
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Found out how to show it now:

[root@freenas ~]# testparm /usr/local/etc/smb4.conf
Load smb config files from /usr/local/etc/smb4.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Backup_Data]"
Processing section "[CCTV]"
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE

[Backup_Data]
path = /mnt/Backup_Data
read only = No
guest only = Yes
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special


[CCTV]
path = /mnt/CCTV
read only = No
guest only = Yes
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special


[homes]
comment = Home Directories
path = /mnt/WinShare/%U
valid users = %U
read only = No
guest only = Yes
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Found out how to show it now:

[root@freenas ~]# testparm /usr/local/etc/smb4.conf
Load smb config files from /usr/local/etc/smb4.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Backup_Data]"
Processing section "[CCTV]"
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE

[Backup_Data]
path = /mnt/Backup_Data
read only = No
guest only = Yes
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special


[CCTV]
path = /mnt/CCTV
read only = No
guest only = Yes
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special


[homes]
comment = Home Directories
path = /mnt/WinShare/%U
valid users = %U
read only = No
guest only = Yes
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special

Well, you've definitely got some problems.
  • It looks like you might have accidentally executed "chmod 775" across /var/db/system. I'd probably start downloading a backup of your config file "system" -> "general" -> "save config", then reinstall FreeNAS and apply the config. It takes a few minutes, but will definitely fix whatever has happened to your system dataset.
  • You have samba sharing out datasets with permissions set to "unix". You should change these to "windows".
  • You have configured your /mnt/WinShare dataset to host samba [homes]. This isn't a good idea because you can end up inadvertently nuking your jail permissions. Create a new dataset "/mnt/WinShare/Samba" for instance, set permissions type to "windows", and set it as the path for your samba Home Directory. Note that [homes] and "guest ok = yes" and "guest only = yes" are a bad combination. You're better off just creating a regular share at that point.
  • You have created multiple datasets under /mnt/CCTV (which is the path for your CCTV share). You will need to make sure that these datasets have permissions set correctly as well (owner - user, owner -group) in the webgui.
  • I'd probably create a dedicated guest user for samba. For instance, "samba-guest", set it as the owner (not group) of the datasets you are sharing, and then set "samba-guest" as the guest user under "services"->"CIFS"
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
As I'm just a newbie here, I have no idea how all the above happened apart a couple of things.
I thought I had set all data sets as windows, but maybe not.

Ok, when you say reinstall Freenas how do you mean, like starting afresh again, removing all the datasets??
Also, won't applying the saved config file afterwards, won't that just put it all back how it was.
Sorry not sure how you mean

What about importing my volumes, ie winshare, backup data and cctv? They were all working fine in FreeNAS 9.3
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Ok, when you say reinstall Freenas how do you mean, like starting afresh again, removing all the datasets??
Sorry not sure how you mean
No need to touch the system disks. Just boot from the freenas install media, point it at your current FreeNAS thumb drive, and perform an upgrade install. This should preserve your config. If it doesn't, then upload your backed-up config and everything will be good again. See here - http://doc.freenas.org/9.10/freenas_install.html#upgrading-using-the-iso

There are of course, other ways to get the same result. I tend to immediately go thermonuclear because that's the way I roll. Once again, when properly done, this procedure will not affect the data on your server.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I have uploaded my backed up config and its back to where I started. I have checked the permisions on the data sets and they are all windows permissions, so I can't see how they became unix ones.
I have set samba as a home share, I think, in as much I ticked the home box, and as far as I can tell I can't see anything which wrong. , but there must be something.

And again no freenas in the network, I'm lost here.

I have just booted into FreeNAS 9.3 and I have networking, as FreeNAS is seen my windows system.

If I send you a debug file from 9.3 could you please highlight the differences between this and 9.10

Update:
I have noticed that when FreeNAS 9.10 is booting up, it gets to a point where this message comes up:
Can't load / path /smb4.conf. Run testparm to debug it.
Could that be why FreeNAS cifs are not available in my windows network?
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
I have uploaded my backed up config and its back to where I started. I have checked the permisions on the data sets and they are all windows permissions, so I can't see how they became unix ones.
I have set samba as a home share, I think, in as much I ticked the home box, and as far as I can tell I can't see anything which wrong. , but there must be something.

And again no freenas in the network, I'm lost here.

I have just booted into FreeNAS 9.3 and I have networking, as FreeNAS is seen my windows system.

If I send you a debug file from 9.3 could you please highlight the differences between this and 9.10

Update:
I have noticed that when FreeNAS 9.10 is booting up, it gets to a point where this message comes up:
Can't load / path /smb4.conf. Run testparm to debug it.
Could that be why FreeNAS cifs are not available in my windows network?

That's certainly a possibility. When I looked at your debug files, I got the impression that permissions in your system dataset was somewhat broken. Did you perform all the steps I listed above (fresh install, recommended changes to share config, etc)?

If so, you should also look closely at your clients. Temporarily turn off security software. Temporarily turn off firewall.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I have done many fresh installs of FreeNAS 9.10 as well as creating samba under WinShare. I have checked all the permissions and made sure the datasets are windows ones.
How do I set samba as owner, not group etc as the owner of all datasets is root and goup is nobody
I'm not sure what changes you mean to the config.

I can't set samba as guest in cifs service, as it is not in the list.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Just for information, I backed up all my data, then removed the shares, then deleted the datasets, but realised later that I didn't need to do that. I detached the volumes, then using volume manager I added them back again, and it was during this process that all data was wiped from the drive. I then created new datasets, as windows cifs shares, and set permissions.
Now , with FreeNAS 9.10, I have most of my data copied back to the relevant dataset.

It was because I had existing datasets and shares in FreeNAS 9.3.1 and 9.10, that I could not access the cifs in windows network, and or because there was somthing wrong with the config file.
 
Status
Not open for further replies.
Top