Security Permission AccessMask Property

G

Guest

I am trying to write some code to parse file permissions, however I have run into some troubling problems
No matter what language or method used to retrieve the accessmask property, if the value is set vide the standard windows GUI the returned value does not equal what the documentation says it is for example

Here are some sample
RIGHT_GENERIC_ALL = 0x1000000
Full control when set through the GUI is = 0x1f01f
Therefore RIGHT_GENERIC_ALL does not equal FullContro
As an interesting point the creator owner special group always seems to get the apparent correct setting 0x1000000

The same is true for the other standard types of permissions too
Any information you can provide much appreciated

P.S. I am starting to think I may need to write code to break the accessmask down into its individual chunks to list the portions that make up the overall permission if anyone else has done this already any pointers would be great.
 
W

Willy Denoyette [MVP]

Inline ***

Willy.
Jason said:
I am trying to write some code to parse file permissions, however I have
run into some troubling problems.
No matter what language or method used to retrieve the accessmask
property, if the value is set vide the standard windows GUI the returned
value does not equal what the documentation says it is for example:

Here are some samples
RIGHT_GENERIC_ALL = 0x10000000
Full control when set through the GUI is = 0x1f01ff
Therefore RIGHT_GENERIC_ALL does not equal FullControl
*** No, because they aren't equal.
As an interesting point the creator owner special group always seems to
get the apparent correct setting 0x10000000

The same is true for the other standard types of permissions too.
Any information you can provide much appreciated.
*** The only valid source is the winnt.h file, search for ACCESS_MASK and
access rights for files
P.S. I am starting to think I may need to write code to break the
accessmask down into its individual chunks to list the portions that make
up the overall permission if anyone else has done this already any
pointers would be great.

*** Declare an enum with the access mask as bit fields.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top