Jeffrey Altman wrote: > Dave Botsch wrote: >> What about giving the user lock permissions (k)? > > Lock privilege only provides for read-locks, not write-locks. > > Need to monitor what Excel does with sysInternal's procmon.exe when > accessing a file it doesn't have write access to via CIFS.
Microsoft Office applications obtain an exclusive lock via a LockFile call regardless of whether the file is being opened in read-write or read mode. If the file is marked read-only, then Microsoft Office apps attempt read-write, get access denied and fall back to read. The app then attempts to obtain the exclusive lock which is mapped to the AFS write-lock. When the user has no write permission, the user is unable to obtain a write-lock. If the goal of the app was to prevent modification to the file, then a non-exclusive lock could be obtained. By requesting an exclusive lock, the app wants to ensure that it is only app accessing the file. When the file is opened in read mode, the app immediately drops the lock after obtaining it and proceeds to read the file without holding the lock. The only work around that I can think of is to request attempt to request a read-lock instead of a write-lock when the file mode is read instead of read-write. Before I make such a change, I want to inquire with the Office team as to the purpose of the lock request. Jeffrey Altman
smime.p7s
Description: S/MIME Cryptographic Signature
