The showacls command toggles the view of file ACLs in smbclient. This works well for files in the root directory of a share, but doesn't work when the file is in a subdirectory. If a file of the same name exists in the root directory, then showacls will show its ACLs.
Here is an example of the symptoms $ smbclient //bri100685/common OS=[Unix] Server=[Samba 3.0.23d-Quest-171] smb: \> cd tmp smb: \tmp\> dir . D 0 Tue Feb 6 15:10:56 2007 .. D 0 Tue Feb 6 15:09:57 2007 foo.txt 54 Tue Feb 6 15:10:56 2007 64507 blocks of size 33553920. 53285 blocks available smb: \tmp\> showacls smb: \tmp\> dir FILENAME:\foo.txt MODE: SIZE:54 MTIME:Tue Feb 6 15:10:56 2007 display_finfo() Failed to open \foo.txt: NT_STATUS_OBJECT_NAME_NOT_FOUND 64507 blocks of size 33553920. 53285 blocks available And here is a fix Index: samba/source/client/client.c =================================================================== --- samba/source/client/client.c +++ samba/source/client/client.c @@ -712,6 +712,9 @@ pstrcat(mask,"*"); } + if (showacls) + pstrcpy(cwd, cur_dir); + do_list(mask, attribute, display_finfo, recurse, True); rc = do_dskattr();
Applied, thanks ! Jeremy.