Mode in an open request and chmod in libsmbclient

Richard Sharpe sharpe at
Fri Mar 2 19:34:45 GMT 2001


So far I have ignored the issue of the mode of opened files. For example,
when you do

   smbc_open(file, O_RDONLY, 666)

I ignore the mode (666) portion. 

However, in looking at the underlying library I am using, I note that there
is a call that sends an SMBsetatr request, so, ...

I could map the mode bits in the reverse way that it is done at the moment,
back to HIDDEN, SYSTEM, READ-ONLY, etc ... and then send the appropriate
SMBsetatr request.

This does bring up the topic of ACLs, however.  Since Samba 2.2.0 will have
an ACL implementation, perhaps there should be SMBC calls that manipulate
ACLs on files as well.  Here, I feel that we should use the standard UNIX
approach to ACLs (POSIX) and map into what SMB wants to do.

Richard Sharpe, sharpe at
Samba (Team member,, Ethereal (Team member,
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba

More information about the samba-technical mailing list