How To Set Access Permissions

For all your non-technical questions.
GraemeAU
Posts: 8
Joined: Mon Nov 14, 2005 10:23 pm

How To Set Access Permissions

Postby GraemeAU » Sat Dec 10, 2005 8:50 pm

I am trying to copy files/folders as part of a web application installation and have the file/folder permissions set to 'Everyone' Full Control. I have read another post called 'Access Control Issue' where another person has had a similar problem and the recommendation was to use the 'Call DLL Function' and use the kernel32.dll's CreateDirectoryA function.
kI have one of two problems here. I have been trying to use Installaware's 'Set Access Control' feature to set Everyone to Full Control or at least read and write but can't get anything to work from there. I therefore tried the other suggested option however I don't understand what I need to enter in the fields of the 'Call DLL Function' to make the CreateDirectoryA function set the permissions for the files/folders of my application.
Can someone provide me a little guidance here.

Thanks
Graeme

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Sat Dec 10, 2005 9:06 pm

I think part of the problem stems from the issue that Explorer doesn't seem to reflect access permission updates correctly. Please use the Set Access Control function normally...and launch your IIS site. If it doesn't work, only then lets try to resolve the issue. Again, Explorer doesn't seem to refresh its ACL display and this confuses us all the time.

GraemeAU
Posts: 8
Joined: Mon Nov 14, 2005 10:23 pm

Postby GraemeAU » Sun Dec 11, 2005 5:58 am

Hi Dinan, I have read in other posts about the explorer issue however my web application is experiencing issues where it needs write permissions to folders that I have tried to give it viw the set access permissions that aren't there. To date I have been unable to see that set access permissions does anything. Can you please provide a methid of setting folder/file permissions by any means. As requested before, if you can provide me with more specific details about using the kernel32.dll to perform the setting of permissions functions ( or otherwise) it would be appreciated.

Thanks
GraemeAU

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Sun Dec 11, 2005 7:03 am

Try using this code:

Code: Select all

~InstallAware Clipboard Data~
~Set Access Control~
~{28481ED9-1FFB-4C6A-85CD-2032E041A200}~
~$TARGETDIR$~
~FALSE~
~FALSE~
~FALSE~
~TRUE~
~$ANONIISUSER$~
~TRUE~
~TRUE~
~TRUE~
~FALSE~
~FALSE~
~TRUE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~Get System Settings~
~{EB126B6E-43DD-422F-B3E6-F78ED7897097}~
~ANONIISUSER~
~59~
~Apply Changes~
~{57CAD4E2-2065-41B4-9A58-05D1BDA3E446}~
~~
~~
~TRUE~
~FALSE~
~Create Folder~
~{277ABD27-9DE7-4FB5-B094-F2CD2C5A1D03}~
~$TARGETDIR$~


Which is, in human readable form:

Code: Select all

Create Folder $TARGETDIR$
Apply Install
Get System Setting IIS Anonymous User Account into ANONIISUSER
Set Read Write Permissions on File System Object "$TARGETDIR$" for $ANONIISUSER$


Where you paste the code in your script is important. You must paste it in your installation block, before any other installation commands execute. This way the folder will be created and permissions applied before the rest of the install happens.

GraemeAU
Posts: 8
Joined: Mon Nov 14, 2005 10:23 pm

Postby GraemeAU » Mon Dec 12, 2005 12:59 am

Hi Sinan, That seems to have done the trick. I just needed to do the 'Apply Install' immediately after I do the folder creation. I did run into the documented feature where the permissions don't show correctly until they are refreshed. Other than that its all fine.

Thanks
GraemeAU


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 33 guests