Previous versions and ROFS, ACCESS_DENIED and VOLUME_WRITE_PROTECTED

Richard Sharpe realrichardsharpe at gmail.com
Tue Dec 10 12:19:14 MST 2013


Hi folks,

In our investigation of properly handling Windows Previous Versions we
found a few interesting things.

1. Windows wants to see STATUS_VOLUME_WRITE_PROTECTED not ACCESS_DENIED

2. Windows will allow CREATEs with WRITE-like access to a previous
version, and will return STATUS_VOLUME_WRITE_PROTECTED when you try to
perform a WRITE-like operation, eg WRITE, Set Attributes, Set EAs, or
SET SD etc. There is a subtlety here, though, because UNIX will
generally return EACCESS on a file that is on a ROFS (if that is how
you have implemented snapshots) so you have to detect this case and
open the file for READ access only and then return the appropriate
error code later when the user tries to do something they are not
allowed to do.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list