Does the user in which the context of the FltCreateFile command will run
have permission to create files on the mapped drive?
For example the local admin account on the client machine…
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.com
Sent: 20 February 2008 16:27
To: Windows File Systems Devs Interest List
Subject: [ntfsd] STATUS_ACCESS_DENIED on FltCreateFileEx for
mapped/network drive
*** WARNING ***
This mail has originated outside your organization, either from an
external partner or the Global Internet.
Keep this in mind if you answer this message.
In my post Create handler in certain situations after a successful
Create operation on a volume I am monitoring, I am then calling
FltCreateFileEx on a separate volume to obtain a file handle I use
later. This seems to work fine on local drives (i.e.
\Device\HarddiskXXX) but in the case of mapped network drives (i.e.
\Device\LanmanRedirector.…) I am always getting STATUS_ACCESS_DENIED.
I’ve tried various styles of filename but always with the same result.
For the working case of local drives/volumes I’m using names similar to
the following:
RtlInitUnicodeString( &FltData.MirrorRoot,
L"\Device\HarddiskVolume1\MIRROR" );
RtlInitUnicodeString( &FltData.SecondaryRoot,
L"\Device\Harddisk1\DP(1)0-0+5\MIRROR" );
For mapped drives I’ve tried the following:
RtlInitUnicodeString( &FltData.MirrorRoot,
L"\Device\LanmanRedirector\machine\share\MIRROR" );
RtlInitUnicodeString( &FltData.MirrorRoot,
L"\Device\LanmanRedirector\;Z:000000000000bf08\machine\share\MIRRO
R" );
Also tried the above 2 with an addition "" tacked onto the end but I’m
always getting STATUS_ACCESS_DENIED.
I’m probably just forgetting something really basic but at the moment
I’m stuck. Any suggestions are greatly appreciated. I’ve done a search
of the archives but couldn’t find anything obvious.
Thanks. Source code below…
InitializeObjectAttributes( &objectAttributes,
&mirrorFileName,
OBJ_KERNEL_HANDLE,
NULL,
NULL );
status = FltCreateFileEx(FltData.Filter,
NULL,
&shContext->mirrorHandle,
NULL,
Data->Iopb->Parameters.Create.SecurityContext->DesiredAccess,
&objectAttributes,
&ioStatus,
(PLARGE_INTEGER) NULL,
Data->Iopb->Parameters.Create.FileAttributes,
Data->Iopb->Parameters.Create.ShareAccess,
(Data->Iopb->Parameters.Create.Options & 0xff000000) >> 24,
Data->Iopb->Parameters.Create.Options & 0x00ffffff,
Data->Iopb->Parameters.Create.EaBuffer,
Data->Iopb->Parameters.Create.EaLength,
0);
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars (including our new
fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: xxxxx@baesystems.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************