Mail Archives: cygwin/2010/01/07/13:42:20
On 01/07/2010 01:02 PM, Corinna Vinschen wrote:
> On Jan 7 00:39, Raman Gupta wrote:
>> Well... yes -- at least in this case. As per the documentation
>> (http://www.cygwin.com/cygwin-ug-net/using.html#mount-table):
>>
>> "Cygwin ignores filesystem ACLs and only fakes a subset of
>> permission bits based on the DOS readonly attribute"
>
> No, it's a bit more tricky. FAT filesystems, which are the role model
> for noacl filesystems don't know something like a R/O directory. The
> DOS R/O bit on a directory does NOT mean the directory is R/O. Rather,
> it only means that the folder is some sort of special folder. For some
> better description, see http://support.microsoft.com/kb/326549.
Wow, isn't that just like Microsoft to reuse an existing read-only bit
for something that is completely different semantically!
In any case, note that the KB article says that attrib *can* be used
to see and modify the value -- as I demonstrated in my previous email.
> Therefore the fault is not on Cygwin's side, but on Samba's side to use
> the DOS R/O bit for something different than Windows uses it on
> directories.
Understood. However, while Samba's use of the read-only bit on
directories does differ somewhat from what Windows Explorer expects to
use that bit for, it is a valid field and it does provide useful
information to the client in the case of noacl Samba mounts.
Therefore, what would you think about configuring this via a mount
option? For example, a per-mount setting called dro/nodro (directory
read-only / no directory read-only) that tells cygwin whether it
should look at the read-only bit or not when calculating the
permissions of directories with noacl? The option would be ignored in
acl mode.
This type of setting would be really useful for noacl mode with samba
mounts, as it would allow the actual write status of the directory to
be shown clearly by cygwin. I haven't checked the cygwin internals,
but might it also allow a slight performance improvement since when
one attempts to, say, "touch foo" inside such a directory, cygwin
could check if this bit was set before actually attempting to write
the file and failing (assuming "dro" is on)?
Cheers,
Raman
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -