JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Filesystem permissions do not flow to sub folders

It seems that if you set permissions on a parent folder of the installed files, this permission does not flow down to sub-folders. How can I enable security at the parent folder to be inherited by all sub folders?

PS. You need to update the contents of the following page: http://www.advancedinstaller.com/user-g ... ialog.html as it shows an older dialog box.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Filesystem permissions do not flow to sub folders

Hello,
It seems that if you set permissions on a parent folder of the installed files, this permission does not flow down to sub-folders. How can I enable security at the parent folder to be inherited by all sub folders?
Currently Windows Installer doesn't always support this. Sometimes the permissions are inherited, sometimes they are not.
However I have discussed this issue with the development team and they added the folder permissions inheritance to its subfolders on our TODO list. It will be available in a future version of Advanced Installer.
PS. You need to update the contents of the following page: http://www.advancedinstaller.com/user-g ... ialog.html as it shows an older dialog box.
The dialog box in the above help article is the same as the one in Advanced Installer 7.7. Are you perhaps using an older version?

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
emu99
Posts: 1
Joined: Mon Feb 07, 2011 9:22 am

Re: Filesystem permissions do not flow to sub folders

Hi,

is the problem with inheriting folder permission solved in version 8.0.2 as you mentioned that it will be implemented in future versions.
just asking because i have a issue with version 8.02 where i placed permissions (full control for administrators and change for everyone) on a subfolder, but during deployment it seems, that not on each target machine on one specific subfolder the permissions are always inherited from the root folder. Clients are Win XP with SP3.
The installation only copies files to a subolder inside program files.

During the past when packaging applications for Tivoli or SCCM with 3rd party tools we created a script with icalcs.exe using SID, so we address worldwide - even with different language xp installed - always the same accounts like authenicated users or administrators. The type "everyone" is not that suitable for us, due to security issues. During audits this is always a problem with a lot of discussions :D

Cheers
Emu
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Filesystem permissions do not flow to sub folders

Hello and welcome to the Advanced Installer Forums,
is the problem with inheriting folder permission solved in version 8.0.2 as you mentioned that it will be implemented in future versions.
We have investigated this and came to the conclusion that this feature doesn't really help because it would generate a lot of redundant information. By default, Windows Installer tries to propagate folder permissions to all its files and subfolders and implementing this feature would create so called duplicates in the in the built MSI.

Please send us the .AIP (project) that manifests the behavior and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alco
Posts: 80
Joined: Thu Nov 18, 2010 5:02 pm

Re: Filesystem permissions do not flow to sub folders

Is there any custom action that can do the same effect?

In my case, setting folder permission is enough on a fresh install. but for upgrades, only the folder gets the correct permission and the files retain the original permission. I want them to inherit the permission set in the parent folder. It would be great if there's a way to force the files to inherit (or copy) the folder permission via some custom actions.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Filesystem permissions do not flow to sub folders

Hi,

I'm afraid we don't have any predefined custom action for this, or any samples that could help you. In your case the OS is probably keeping the permissions from the old files,
preventing for the new ones to be correctly inherited from their parent folders.

Have you tried using a different install path for each version? For example including the product version in the default install path.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alco
Posts: 80
Joined: Thu Nov 18, 2010 5:02 pm

Re: Filesystem permissions do not flow to sub folders

Have you tried using a different install path for each version? For example including the product version in the default install path.
That is a no-go, then, because we want to keep the same folder.

Is there really no way? A vbs or even a bat file that can do this?
alco
Posts: 80
Joined: Thu Nov 18, 2010 5:02 pm

Re: Filesystem permissions do not flow to sub folders

Well, well... apparently there's a way.

It seems setting the folder permission via the Permission tab only applies the permission to "This folder only". What we want is to apply to "This folder, subfolders and files". This can be done via custom action as follows:
  1. Create a "New Custom Action" > "EXE with Working Dir"
  2. For the Working Dir, specify the parent folder of the target folder
  3. In the Full Path, type "cacls <target folder> /t /e /c /p Users:f" (without the surrounding quotes of course, but if your target folder contains spaces, then I think you must enclose the target folder name in quotes)
alco
Posts: 80
Joined: Thu Nov 18, 2010 5:02 pm

Re: Filesystem permissions do not flow to sub folders

This has been working for quite a while, but the only problem is this shows the command window. I tried the following and I somehow can't get them to work as I still end up with the permissions not applied on subfolders and files. Maybe I'm doing something wrong?...

http://www.advancedinstaller.com/forums ... 380#p47119
http://www.advancedinstaller.com/forums ... 014#p34201
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Filesystem permissions do not flow to sub folders

Hello,

Here's another article that may help you hide the command line window:
http://www.advancedinstaller.com/user-g ... indow.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Igor Markovic
Posts: 17
Joined: Wed Jan 04, 2012 1:44 pm

Re: Filesystem permissions do not flow to sub folders

I stumbled upon the same issue. Here the simplified scenario.

We create the following directory structure in AI:

Code: Select all

A
 |-B
    |-C
Permissions of folder A:
- Admin: Full Control
- SomeUser: Full Control
- Everyone: Modify

Permissions of folder C:
- Admin: Full Control
- SomeUser: Full Control

Now we want that folder B just inherits the permissions of folder A, however this doesn't seem the case.

If I set the permissions of folder B to:
- Everyone: Modify

and check the option 'Keep existing permissions' then folder B will inherit the other permissions from folder A. However I would like to be able to do this without having to specify a specific permission for folder B as it is not always clear what the permission should be at this point. Is there any way of achieving this?

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Filesystem permissions do not flow to sub folders

Hello Igor,

As a workaround you can enable the "Apply to all subfolders" permissions option for your folder A. Then you can edit your folder C permissions as you need and rebuild and test again the installation project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Igor Markovic
Posts: 17
Joined: Wed Jan 04, 2012 1:44 pm

Re: Filesystem permissions do not flow to sub folders

Yes, although this would only work if folder A is created by our own setup. And I would prefer to just inherit the permissions of parent folders instead of setting strict permissions on subfolders.

So here my feature request: Please make folders inherit permissions by default even when creating subfolders which contain folders with specific permissions set (this scenario seems to be the problem). Or at least allow setting 'Keep existing permissions' even when no other permissions are set on a specific folder to inherit permissions of the parent folder.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Filesystem permissions do not flow to sub folders

Hello,

When no permission is explicitly added on your folder B, then at install time the folder B will be created with the default permissions of his parent folder which already exists before install time on target machine. This is why the "Keep existing permissions" option is disabled.

To make sure I fully understand your requirement, can you please give us a small example of what do you exactly want to achieve? What permissions do you need to be applied on folder B at install time: the default existing permissions on target location before install time or the default existing permissions on target location before install time plus the permissions you explicitly set on folder A?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”