Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > modifing ShareAccess ( removing FILE_SHARE_WRITE ) of a file

Reply
Thread Tools Display Modes

modifing ShareAccess ( removing FILE_SHARE_WRITE ) of a file

 
 
siddu
Guest
Posts: n/a

 
      06-04-2010
Hi all,


I opened the usermode file in my driver using zwcreatefile with
FILE_SHARE_READ
and FILE_SHARE_Write access . i mount my file as a virtual volume.
Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the fly ).
and i also want to set FILE_SHARE_WRITE when ever i want.

I need api or file system IOCTL or any other possible way to do it.

thanks.







 
Reply With Quote
 
 
 
 
Scott Noone
Guest
Posts: n/a

 
      06-07-2010
> Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the
> fly ).
> and i also want to set FILE_SHARE_WRITE when ever i want.
>
> I need api or file system IOCTL or any other possible way to do it.


Strange...You need to write a file system filter driver and manage the
sharing on the file yourself. There's no way to force the FS to do what
you're asking for here.

If you tell us what you're trying to accomplish there might be an easier
solution for you.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com




"siddu" <> wrote in message
news:556A026E-3C50-47CD-BB62-...
> Hi all,
>
>
> I opened the usermode file in my driver using zwcreatefile with
> FILE_SHARE_READ
> and FILE_SHARE_Write access . i mount my file as a virtual volume.
> Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the
> fly ).
> and i also want to set FILE_SHARE_WRITE when ever i want.
>
> I need api or file system IOCTL or any other possible way to do it.
>
> thanks.
>
>
>
>
>
>
>

 
Reply With Quote
 
siddu
Guest
Posts: n/a

 
      06-10-2010
thanks scott for reply,

i have taken sample of filedisk-17 from http://www.acc.umu.se/~bosse/
using this driver i created a file and mounted as disk or volume (eg h: as
drive letter) .

Now i have written seperate application which sends the IOCTL to the driver
in which the driver should set this H: drive in read share mode only, so
that it should disable file copying to that drive.

thanks a lot.

when i reset it user can write to the drive.


"Scott Noone" wrote:

> > Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the
> > fly ).
> > and i also want to set FILE_SHARE_WRITE when ever i want.
> >
> > I need api or file system IOCTL or any other possible way to do it.

>
> Strange...You need to write a file system filter driver and manage the
> sharing on the file yourself. There's no way to force the FS to do what
> you're asking for here.
>
> If you tell us what you're trying to accomplish there might be an easier
> solution for you.
>
> -scott
>
> --
> Scott Noone
> Consulting Associate
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
>
>
>
>
> "siddu" <> wrote in message
> news:556A026E-3C50-47CD-BB62-...
> > Hi all,
> >
> >
> > I opened the usermode file in my driver using zwcreatefile with
> > FILE_SHARE_READ
> > and FILE_SHARE_Write access . i mount my file as a virtual volume.
> > Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the
> > fly ).
> > and i also want to set FILE_SHARE_WRITE when ever i want.
> >
> > I need api or file system IOCTL or any other possible way to do it.
> >
> > thanks.
> >
> >
> >
> >
> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
testing smart card minidriver leochou Windows Vista Security 0 05-28-2010 10:16 AM
Windows 2003 R2 - Missing Disk Space on System drive zinger-uk Windows Server 12 11-29-2009 12:02 PM
error code 0x8024D007 jenny Windows Update 10 11-23-2009 05:48 PM
chkdsk : NTFS on Vista x64 Nigel Windows Vista File Management 5 06-02-2008 02:02 PM
Difficulty with EFS & importing PFX file Aaron Solomon Windows Vista File Management 0 08-24-2007 09:08 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59