Should 'map readonly' be overridden by 'store dos attributes' or NFSv4 ACLs?

Andrew Bartlett abartlet at samba.org
Mon May 6 03:32:43 MDT 2013


The manpage for 'map readonly' confidently states (even with an
underline) that:


If store dos attributes is set to yes then this parameter is ignored

However, it (as far as I read the code) has never been the case.  

This comes up because on NFSv4 systems, as discussed in the thread
regarding the ACL patches, the owner of a file often has 0 permissions
(due to there being no @owner acl), and so has the dos readonly flag
set.  This is a pain, as things on windows respect this flag.

To work around this, many platforms with ACLs also set 'store dos
attributes = true', which makes a lot of sense (as we don't want to be
messing with permission bits, that would break ACLs badly).  A trusting
user might even dare to trust the we behave as the man-page indicates. 

I would like to know if we should change the code to match the manpage,
or change the manpage to match the code (drop this sentence).

Or if we should make invoking an NFSv4 ACL module force an override here
of some kind (I dislike vfs modules changing smb.conf values however).

The full paragraph from man smb.conf is:


           This parameter can take three different values, which tell
smbd(8) how to display the read only attribute on files,
           where either store dos attributes is set to No, or no
extended attribute is present. If store dos attributes is set to
           yes then this parameter is ignored. This is a new parameter
introduced in Samba version 3.0.21.


Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list