DOS flags <--> UNIX permitions

Nick Demou ndemou at enlogic.gr
Thu May 10 09:38:14 GMT 2001


Hi all,
I've made some testings regarding the mapping of read only and archive bit
by samba and came up with the following. I'm posting them thinking they may
be important for some of you:

1) the first one apears to be a little bug:
When a user creates a directory which is suposed to be writeable by the
owner and the group and then the same user trys to set the "read only"
attribute this funny thing hapens:
The owner W bit remains set while the group W bit is cleared.
After that there is no way to setback the group W bit from windows
environment (and that's why I regard this as a bug).

Here are the settings I believe are relevant (the full smb.conf is inluded
at the end of this text)
    directory mask       = 0770
    force directory mode = 0000
    dos filemode = yes

2) the archive bit never gets set in directories (the same smbconf settings
aply)
I believe this is not so important. I only mention it because the manual
doesn't clarify this issue and I don't know of what usage the folder's
archive bit is for DOS (my backup program seems to ignore it, it only checks
the files archive bit).

3) even if one sets the dos filemode = yes for a share there will be a fine
diference in the way that DOS/Windows handle the attributes:
In shares were more than one users logon (and no "force user" setting
aplies) if a non-owner that has write acces to a file tries to set the read
only attribute he will succeed BUT if imidietly after the same user will try
to clear it he wont be able (since he has no more write-access any more!).
Again only the owner of the file can clear the read only flag (as was the
case prior to dos filemode=yes). Some bizar windows programs may be affected
by this behaviour (programers write strange things sometimes ;-) and some
say windows one's do even stranger).







More information about the samba mailing list