Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- From: "anton bassov" <soviet_bloke@xxxxxxxxxxx>
- Date: 13 Nov 2006 13:51:04 -0800
Do i must modify user rights or driver rights ????
In actuality, none of the above....
You have to modify not user rights and DEFINITELY not driver rights,
but access permission to your target device (i.e. its ACL) Check MSDN,
namely, GetSecurityInfo()/SetSecurityInfo(), plus SetEntriesInAcl(),
for more info
Anton Bassov
SteM wrote:
Thanks Anton,
my guess was that, at least, open, close and DeviceIoControl was allowed
....
How can i solve ?
Do i must modify user rights or driver rights ????
Thanks
--
SteM
"anton bassov" <soviet_bloke@xxxxxxxxxxx> ha scritto nel messaggio
news:1163436308.076405.201750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi mateon
This is just absolutely normal default behaviour - limited users have
no access to devices by default. If you want non-privileged users to
gain access to it, you have to EXPLICITLY allow the above (it is
understandable that it can be done only from the Admin account)
Anton Bassov
SteM wrote:
Hello,
I've written a small wdm driver for Win2000 to access an old custom hw
amparallel port.
The accesses are via a couple of DeviceIoControl() custom commands.
It works fine, does exactly what i intended; however, it only works if I
withlogged in as Administrator (or equivalent).
If I log in as a regular user (Power User) the call to CreateFile fails
ACCESS_DENIED.
// Open driver
rv = CreateFile (
ifDetail->DevicePath,
0, // Desidered access
0, // Share mode
NULL, // Security attrb
CREATE_NEW, // How to create
FILE_FLAG_DELETE_ON_CLOSE, // File attribute
NULL // Template file
);
if (rv==INVALID_HANDLE_VALUE)
{
......
Thanks in advance for any pointers...
--
SteM
.
- Follow-Ups:
- Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- From: Don Burn
- Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- References:
- CreateFile() returns ERROR_ACCESS_DENIED to the user
- From: SteM
- Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- From: anton bassov
- Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- From: SteM
- CreateFile() returns ERROR_ACCESS_DENIED to the user
- Prev by Date: Re: How do I get a list of cached users?
- Next by Date: Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- Previous by thread: Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- Next by thread: Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
- Index(es):