Same error code 13

Jeremy Allison jra at
Mon May 8 15:25:49 UTC 2023

On Mon, May 08, 2023 at 06:42:00PM +0530, Vikram Bharti via samba-technical wrote:
>Hi Team
>I am using libsmbclient API *smbc_getFunctionOpendir *to  open a
>file/directory . This function returns *error code 13 *in case of *wrong
>credentials *and also in case the user is not having permission to view the
>file/folder. Now I am unable to interpret whether the return code is due to
>wrong credential or forbidden access.
>Is there any such API which can *list out the allowed permissions* to a
>specific user . Or just to verify whether the * credential i*s valid for

If a credential is valid for a share, you should be able
to open the root directory of that share. That will tell
you if the cred is valid before trying to open anything

More information about the samba-technical mailing list