Access a file which is opened with exlcusive access by other

  • amr123
  • Newbie
  • Newbie
  • amr123
  • Posts: 10

Post 3+ Months Ago

Hi All,

I want to access a file which is already opened in exclusive mode by some other process. I know that, the I/O manager won't allow accessing file already opened with exclusive access. But is there a way using which I can bypass the I/O manager and get handle to the file.

Please give me some information about it.

Thanks.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4923
  • Loc: NY

Post 3+ Months Ago

Is it a system file or a file that belongs to another user?
  • amr123
  • Newbie
  • Newbie
  • amr123
  • Posts: 10

Post 3+ Months Ago

A file that belongs to another user who has opened it in exclusive mode.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4923
  • Loc: NY

Post 3+ Months Ago

That's not an easy task. There are a lot of factors such as file location, file permissions, ownership, network topology, etc...

It might take a man in the middle attack or arp poisoning to make that one happen.

What's in the file?
  • amr123
  • Newbie
  • Newbie
  • amr123
  • Posts: 10

Post 3+ Months Ago

Actually I have all the rights to the file.

My problem is not related to the file permissions.

If a file is opened using CreateFile() API in exclusive mode then
each other call to CreateFile() API will fail as IO manager checks if file is opened in exclusive mode it will not allow anyone even if he is owner/creater of the file.

But my requirement is to read that file. Is there any way to do it?
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4923
  • Loc: NY

Post 3+ Months Ago

If you have rights to the file, can't you tell the other user to let you view it? There is missing piece of the story. What is it? Are you at work?
  • amr123
  • Newbie
  • Newbie
  • amr123
  • Posts: 10

Post 3+ Months Ago

Hi Don2007,

Please read CreateFile() API from MSDN and understatnd what is exclusive mode.

Earliar I have told you that this problem is not related with file permitions.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Reconfigure the process using createfile so that dwShareMode isn't exclusive ?

I would think that anything which would bypass an exclusive lock on a file would be considered a flaw and patched anyways. :scratchhead:

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 44 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.