SOLVED Help needed getting Windows SMB shares working again

adastomek

Cadet
Joined
Jul 29, 2020
Messages
5
Hi,

Thank you for taking the time to view my thread

I set up a FreeNas a week ago now out of an old PC with the aim of eventually creating a proper home NAS.

Freenas system:
AMD fx-6300 processor
Asus M5A97 R2.0 Motherboard
Seagate BarraCuda 1TB Desktop Hard Drive
24 GB DDR3 (1866) Ram in 3 channels

I was able to setup an SMB shares to my pool successfully following the video from the freenas channel, it was all working correctly and I was able to transfer files without a problem; since then I've done other things such as set-up a plex server and attempted to setup ssh for remote access.

However recently I have been unable to access my pool through the SMB share to my Windows 10 machine with either one of 2 errors coming up:


1. "you do not have access to windowshare" despite trying to login as the root user and triple checking the ACL permissions

2. "The Network folder specified is currently mapped using a different user name and password" despite disconnecting all the drives restarting the NAS and the Windows 10 machine

What I've Tried:

1. resetting the gui settings (through the shell) using:

cp /data/factory-v1.db /data/freenas-v1.db && reboot

and then inserting the pool back in though the "existing pool" option

2. creating new shares and users as well as a new SMB share; and a "windows" user with the same login and password as my PC

3. Using a different client computer

4. checking for updates on both the freenas and PC

5. ensuring that SMB feature is switched on in "windows features"


I'm quite prepared to just restart the whole thing, wipe the drives and reinstall FreeNAS from scratch (I've got backups of the data put onto the NAS) but i'd rather not run into this problem again.

So the question is whether there is anything I should look at (maybe some windows settings) that would fix this issue.

If you need additional details please ask and thank you again for taking the time to help a new user
Adam A
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Please supply the output of testparm -s on your FreeNAS server. Also look at /var/log/samba4/log.smbd, and provide relevant log entries corresponding to the timestamps when you experience the error.
 

adastomek

Cadet
Joined
Jul 29, 2020
Messages
5
Thanks for the response!

testparm -s

root@freenas[~]# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
aio max threads = 2
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
enable web service discovery = Yes
kernel change notify = No
load printers = No
logging = file
max log size = 51200
nsupdate command = /usr/local/bin/samba-nsupdate -g
restrict anonymous = 2
server min protocol = NT1
server role = standalone server
server string = FreeNAS Server
username map = /usr/local/etc/smbusername.map
username map cache time = 60
idmap config *: range = 90000001-100000000
idmap config * : backend = tdb
allocation roundup size = 0
directory name cache size = 0
dos filemode = Yes
include = /usr/local/etc/smb4_share.conf

[homeshare]
aio write size = 0
ea support = No
mangled names = illegal
path = /mnt/pool1/homeshare
read only = No
vfs objects = streams_xattr shadow_copy_zfs ixnas
nfs4:acedup = merge
nfs4:chown = true


log.smbd

I'm getting the following error throughout:

[2020/08/06 15:50:35.679979, 0] ../../source3/smbd/uid.c:448(change_to_user_internal)
change_to_user_internal: chdir_current_service() failed!

and when I (attempt) to log in, the following shows up:

[2020/08/06 15:50:28.613128, 1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
Failed to fetch record!
[2020/08/06 15:50:28.613164, 1] ../../source3/smbd/server_reload.c:64(delete_and_reload_printers)
pcap cache not loaded
[2020/08/06 15:50:29.101845, 1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
Failed to fetch record!
[2020/08/06 15:50:29.101874, 1] ../../source3/smbd/server_reload.c:64(delete_and_reload_printers)
pcap cache not loaded


For further information, the share "homeshare" appears and I am able to attempt a login, but when I do I i''m greeted with the "you do not have permission to access \\FREENAS\homeshare" error despite the acl permissions being correct
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
[2020/08/06 15:50:35.679979, 0] ../../source3/smbd/uid.c:448(change_to_user_internal)
change_to_user_internal: chdir_current_service() failed!

This indicates the permissions on the path are wrong. Can you provide the output of ls -ld /mnt/pool1/homeshare and also /mnt/pool1.
 

adastomek

Cadet
Joined
Jul 29, 2020
Messages
5
ls -ld /mnt/pool1/homeshare :

drwxrwx---+ 2root wheel 2 Aug 5 18:29 /mnt/pool1/homeshare

ls -ld /mnt/pool1 :

drw------- 6 root wheel 6 Aug 5 18:39 /mnt/pool1


ls -ld.PNG
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yes, you've prevented any traversal from the root of the pool. To fix this, try:

Code:
chmod 755 /mnt/pool1
chmod 755 /mnt/pool1/homeshare
 

adastomek

Cadet
Joined
Jul 29, 2020
Messages
5
/mnt/poo1 worked but /homeshare looks like its not permitted:

chmod 755.PNG


however despite this i'm now able to access "homeshare" on my windows machine as I was able to before. should I still be concerned about the permissions?

Thank you once again!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
should I still be concerned about the permissions?

For now, the ACL is taking care of the access. When you have some downtime, recursively remove the ACL from homeshare, and apply that chmod then. Afterwards, re-apply the ACL.
 
Top