Hi,
I am trying to mount a share programatically using SmbClient.framework. (SMBFramework 30064).
Here is my code:
SMBHANDLE mConnection;
uint64_t options = kSMBOptionSessionOnly;
NTSTATUS status = SMBOpenServerEx("smb://john:passwd@192.168.12.34/share1", &mConnection, options);
if (NT_SUCCESS(status)) {
status = SMBMountShareEx(mConnection, nullptr,"/var/tmp/share1", MNT_DONTBROWSE, 0, 0, 0, nullptr, nullptr);
}
After mounting a share, I can navigate to mounted path and explore it from the Finder. However I see that the permissions for all the files from GetInfo shows "You have unknown access" and I cannot edit any file. finder throws -120 or the editing app cannot save that file.
If I mount the same share with the "mount" command, the GetInfo shows "You have custom access" and I can edit any file properly.
I tried with different mount options but nothing seems to solve the issue. Editing text files work but not word or excel file.
here is the output of mount command: the first one was mounted using "mount" command, the second was mounted using "SMBMountShareEx"
//vkawade@172.16.147.75/elc on /Users/vinay/mPoint (smbfs, nodev, nosuid, mounted by john)
//vkawade@172.16.147.75/elc on private/var/tmp/uuid:92588:device (smbfs, nodev, nosuid, nobrowse, mounted by john)
Any help would be highly appreciated!
Thanks,
Vink