|
|
#1 |
|
Member
Join Date: Jan 2006
Location: USA
Posts: 82
|
I'm trying to set both folder and file NTFS permissions
This is what I've tried so far: code: Unfortunately, the resulting permissions are not what I want. I want the $WebUser / Everyone accounts to have Read access to all folders/files in $INSTDIR\PHP -- this is done properly. I also want only the $WebUser account (i.e. IUSR_TEST2) to have ONLY have GenericRead permissions to the $INSTDIR\PHP\uploadtemp directory. Additionally, I want it to have Read/Write/Execute rights ONLY on files in that directory. It seems the AccessControl plugin always uses an "Apply To" of This folder, subfolders, and files. For the $INSTDIR\PHP\uploadtemp folder I want an "Apply To" of Files only. Here is a detailed listing of the relevant applied permissions from the script above [sessiondata omitted] (used Sysinternals Accesschk tool): code: While it's not a really big deal they're not applied as granular as I want, it would be a good idea to apply them correctly for security reasons. Any ideas on how to accomplish what I'm after? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,776
|
from the simple test I did
seems to work (I can edit file.ini, but not create new files, not sure if this is what you wanted, but you should be able to tweak this a bit, but from what I can tell, you have to specify the permissions for the folder/files first, then strip off permissions for just the parent folder)code: IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2006
Location: USA
Posts: 82
|
Ah, that /NOINHERIT switch should be documented more. If one doesn't use that, security isn't applied/removed correct at all on single files.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Use SetOnFile not GrantOnFile to overwrite existing access control entries of a trustee.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2006
Location: USA
Posts: 82
|
Just ran across this for another project... it would be helpful if you referenced this MSDN page in your readme / wiki
SID Strings |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
This page would be a better example:
Well-known security identifiers in Windows operating systems Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#7 |
|
Member
Join Date: Jan 2006
Location: USA
Posts: 82
|
While thats true, in your examples you use "BU". That "Well-known security identifiers in Windows operating systems" page doesn't make any reference to what BU is. The page I linked to explains / lists all the options.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|