Problems setting security on folders - Advanced Installer Community
Xtrophic
Posts: 2
Joined: Tue Jun 07, 2022 1:13 pm

Problems setting security on folders

Hi,

I am trying to restore a database from a temporary install file and have set the temporary folders permission to "[GRP_EVERYONE]". However when the folder is created at install time it does not have any permissions set.

Running latest version 19.5 (just upgraded, and could swear it was working in previous version as it has been successful the past week).

This in turn makes the install fail as SQL server cannot access the temporary file.

So am I doing something wrong or was a bug just introduced?
Attachments
permission_settings_fail.png
permission_settings_fail.png (22.37 KiB) Viewed 1662 times
permission_settings.png
permission_settings.png (31.83 KiB) Viewed 1662 times
Xtrophic
Posts: 2
Joined: Tue Jun 07, 2022 1:13 pm

Re: Problems setting security on folders

A follow up. It seems permissions are set when the installer is finished. But that will not help me in restoring a database from a temporary folder.
When the SQL database script is executed permissions are not set and thus it's unable to restore the database from the temporary file.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems setting security on folders

Hello and welcome to our forums,

First of all, please accept my apologies for the delayed reply.

The permissions on the folder are set during the "deferred" stage (when the system is modified) of the installation process.

That would be sometimes during the "Add resources" action group.

It has always been like this, since it is recommended to only do machine changes during the "deferred" stage.

Deferred Execution Custom Actions

If you would like to set the permissions earlier, you could create your own custom action to do so. However, I am not 100% sure this would work since the custom action must run with elevated permissions in order to set those permissions on the folder.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”