public inbox for developer@lists.illumos.org (since 2011-08)
 help / color / mirror / Atom feed
* [developer] possible bug in smbfs ?
@ 2024-10-02 13:29 Gabriele Bulfon via illumos-developer
  2024-10-02 14:54 ` Jason King
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriele Bulfon via illumos-developer @ 2024-10-02 13:29 UTC (permalink / raw)
  To: illumos-developer


[-- Attachment #1.1: Type: text/plain, Size: 1299 bytes --]

Hello, we have an illumos system with many zones, and a separate illumos system sharing CIFS folders in workgroup mode.
Each zone mounts a dedicated share with just its own permissions, using smbfs.
After some time we realized something wierd was happening: in some folders running just "ls" from the zone shows only 125 files while on the storage dataset ther are more than 1000. File permissions are ok, all the same.
More, missing files are different and random from zone to zone on their dedicated smb share.
Even more, missing files can be accessed from the zone specifying a full file name, but are missing when using "*":

root@z153:/export/home/dos/ariansped# ls ftparia.log
ftparia.log
root@z153:/export/home/dos/ariansped# ls ftparia.*
ftparia.*: No such file or directory
 
Is there any known bugs in this cifs client implementation?

Thanks,
Gabriele
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 


------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2325b50b338eaba9-Mb2d66cea38e7a0bb05857ed3
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

[-- Attachment #1.2: Type: text/html, Size: 3301 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [developer] possible bug in smbfs ?
  2024-10-02 13:29 [developer] possible bug in smbfs ? Gabriele Bulfon via illumos-developer
@ 2024-10-02 14:54 ` Jason King
  2024-10-03  7:31   ` Gabriele Bulfon via illumos-developer
  0 siblings, 1 reply; 3+ messages in thread
From: Jason King @ 2024-10-02 14:54 UTC (permalink / raw)
  To: illumos-developer

[-- Attachment #1: Type: text/plain, Size: 2599 bytes --]

There is a share option ‘abe’ (access based enumeration). If enabled on a share, clients will only see the files they have some sort of access to. You could try disabling that and see if the results are more what you expect.

I suspect the difference in behavior is probably related to when specifying an exact filename as a parameter to ls, it tries to do a stat(2) (or the SMB equivalent), while a glob will get expanded by the shell, and the needs to enumerate the contents of a directory (which is where the abe option may come into play) to figure out what the expansion is (which if it succeeds, is then passed as parameters to the command).



From: Gabriele Bulfon via illumos-developer <developer@lists.illumos.org>
Date: Wednesday, October 2, 2024 at 8:30 AM
To: illumos-developer <developer@lists.illumos.org>
Subject: [developer] possible bug in smbfs ?
Hello, we have an illumos system with many zones, and a separate illumos system sharing CIFS folders in workgroup mode.
Each zone mounts a dedicated share with just its own permissions, using smbfs.
After some time we realized something wierd was happening: in some folders running just "ls" from the zone shows only 125 files while on the storage dataset ther are more than 1000. File permissions are ok, all the same.
More, missing files are different and random from zone to zone on their dedicated smb share.
Even more, missing files can be accessed from the zone specifying a full file name, but are missing when using "*":

root@z153:/export/home/dos/ariansped# ls ftparia.log
ftparia.log
root@z153:/export/home/dos/ariansped# ls ftparia.*
ftparia.*: No such file or directory

Is there any known bugs in this cifs client implementation?

Thanks,
Gabriele


Sonicle S.r.l. : http://www.sonicle.com<https://www.sonicle.com/>
Music: http://www.gabrielebulfon.com<http://www.gabrielebulfon.com/>
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets

illumos<https://illumos.topicbox.com/latest> / illumos-developer / see discussions<https://illumos.topicbox.com/groups/developer> + participants<https://illumos.topicbox.com/groups/developer/members> + delivery options<https://illumos.topicbox.com/groups/developer/subscription> Permalink<https://illumos.topicbox.com/groups/developer/T2325b50b338eaba9-Mb2d66cea38e7a0bb05857ed3>

------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2325b50b338eaba9-Md24e7f6e984bb3b2a05c150a
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

[-- Attachment #2: Type: text/html, Size: 6842 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [developer] possible bug in smbfs ?
  2024-10-02 14:54 ` Jason King
@ 2024-10-03  7:31   ` Gabriele Bulfon via illumos-developer
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriele Bulfon via illumos-developer @ 2024-10-03  7:31 UTC (permalink / raw)
  To: illumos-developer


[-- Attachment #1.1: Type: text/plain, Size: 3229 bytes --]

Thanks, but there is no "abe" enabled on those shares, and actually all files have same acls and permissions, both those that are visible and the ones that are not through "ls".
With any other smb client (windows pc, smbclient -U ...) everything is shown correcetly.
It happens only from those zones, mounting using smbfs on vfstab.
Also, those files are created by the zones themselves, and they appear in a short timeframe, then they disappear randomly, but they're still there on the shares and visible from other smb clients.
 
Gabriele
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 

 


Da: Jason King <jason.brian.king@gmail.com>
A: illumos-developer <developer@lists.illumos.org>
Data: 2 ottobre 2024 16.54.00 CEST
Oggetto: Re: [developer] possible bug in smbfs ?




There is a share option ‘abe’ (access based enumeration). If enabled on a share, clients will only see the files they have some sort of access to. You could try disabling that and see if the results are more what you expect.
 
I suspect the difference in behavior is probably related to when specifying an exact filename as a parameter to ls, it tries to do a stat(2) (or the SMB equivalent), while a glob will get expanded by the shell, and the needs to enumerate the contents of a directory (which is where the abe option may come into play) to figure out what the expansion is (which if it succeeds, is then passed as parameters to the command).
 
 
 
From: Gabriele Bulfon via illumos-developer <developer@lists.illumos.org>
Date: Wednesday, October 2, 2024 at 8:30 AM
To: illumos-developer <developer@lists.illumos.org>
Subject: [developer] possible bug in smbfs ?

Hello, we have an illumos system with many zones, and a separate illumos system sharing CIFS folders in workgroup mode.

Each zone mounts a dedicated share with just its own permissions, using smbfs.
After some time we realized something wierd was happening: in some folders running just "ls" from the zone shows only 125 files while on the storage dataset ther are more than 1000. File permissions are ok, all the same.

More, missing files are different and random from zone to zone on their dedicated smb share.

Even more, missing files can be accessed from the zone specifying a full file name, but are missing when using "*":

root@z153:/export/home/dos/ariansped# ls ftparia.log
ftparia.log

root@z153:/export/home/dos/ariansped# ls ftparia.*
ftparia.*: No such file or directory

 

Is there any known bugs in this cifs client implementation?

Thanks,
Gabriele

 

 

Sonicle S.r.l. : http://www.sonicle.com

Music: http://www.gabrielebulfon.com

eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets

 






illumos / illumos-developer / see discussions + participants + delivery options Permalink

------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2325b50b338eaba9-M120eafa44f877e65b1d7426a
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

[-- Attachment #1.2: Type: text/html, Size: 8886 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-03  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02 13:29 [developer] possible bug in smbfs ? Gabriele Bulfon via illumos-developer
2024-10-02 14:54 ` Jason King
2024-10-03  7:31   ` Gabriele Bulfon via illumos-developer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).