Using //freenas shows no files, but //IP address shows files?

Status
Not open for further replies.

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
I've been seeing this on my Win7 box intermittently and on Win8 from time to time.

If the IP addresses of those boxes are put into the CIFs share, and I'm using guest with no password, they should be able to see the datasets the CIFs share has.

But let's say I have a downloads directory.

Win7: //freenas/downloads will show as empty, but occassionally show items there that have persisted for some time.

Win7: //192.x.x.x/downloads is showing perfectly up to the second.

Win8: //freenas won't connect. Sometimes does, sometimes doesn't
Wind 8: //192.x.x.x./ works 100% of the time.

Whenever I check the console messages I see no failed attempts by either client.
 

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
Haven't tried hosts file on Windows, but given:

1. Windows Explorer sees it in Network listing and can browse it no problem at directory structure - but sees only "old" content.
2. Media Browser 2.6.2 is setup to get listings on that PC using //freenas/movies and //freenas/television and has no problem showing those (even new ones) out in Windows Media Center.

So given the Win7 box can find //freenas and some programs get all content while explorer can browse and see anything that's been there for some time, not sure it's a hosts problem.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Haven't tried hosts file on Windows, but given:

1. Windows Explorer sees it in Network listing and can browse it no problem at directory structure - but sees only "old" content.
2. Media Browser 2.6.2 is setup to get listings on that PC using //freenas/movies and //freenas/television and has no problem showing those (even new ones) out in Windows Media Center.

So given the Win7 box can find //freenas and some programs get all content while explorer can browse and see anything that's been there for some time, not sure it's a hosts problem.
Probably not hosts, but I've seen stranger things happen in CIFS. I've actually experienced the problem you're describing before.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Okay, I'm a bit less rushed right now. The following is just conjecture. I don't really have free time to test it.

At its core your problem is a permissions problem. In certain circumstances that I have yet to clearly define, Samba will make folders within shares invisible for users that do not have an access control entry on the NTFS access control list (security tab in Explorer). An example of how I have replicated this problem is as follows:
  • Create a share "Shared"
  • Configure NTFS ACL so that "Domain Users" and "Domain Admins" have read, write, modify privileges to "Shared"
  • Create a folder "Admin Stuff" under \\Computer\Shared\
  • Disable permission inheritance in NTFS ACL for "\\Computer\Shared\Admin Stuff"
  • Remove "Domain Users" from NTFS ACL for "\\Computer\Shared\Admin Stuff"
Standard behavior for a windows computer is to show folder, but deny access. Samba will sometimes make the folder disappear. Where does that leave us with respect to your problem? I have observed that CIFS appears to handle user accounts differently when trying to connect to a server at "\\IP-Address\Share" as opposed to "\\Hostname\Share". In the former case, by default Windows will try to authenticate using a local account on the server using the credentials "User". In the latter case, it will pass along credentials "\\host computer or domain\User". Windows appears to treat the trust level of a server that you connect to through IP-Address as lower than one that is in the same workgroup.

In short, there are some subtle differences in how windows passes credentials when connecting to a server at \\ipaddress vs \\hostname, which is causing problems with permissions in Guest sessions. The difference in observed behavior between Win7 and Win8 may be a SMB2 vs SMB3 issue.

The solution:
1) fix permissions on your folders.
2) create user account(s) and authenticate properly.

You might want to do (2) because guest sessions in samba are flaky.
Regarding (1) post the output of "ls-l" in "/mnt/[pool]/Downloads" and "getfacl" for a file that disappears. If you feel like doing some overkill, increase samba's logging verbosity and on windows 8 connect through IPAddress (create file) then connect through hostname (and create a second log file). Attach to this thread.
 
Status
Not open for further replies.
Top