Overwrite directory permissions option doesn't overwrite directory permissions
I'm running in Mojave using an id that is administrator and in the wheel group.
I created a small project that demonstrates the problem. I'm attaching the pkgproj file and the pkg file I built with it
In Settings, I selected "Require admin password for installation" and "Overwrite directory permissions"
In Payload I created directories /Library/Preferences/testfoo with owner root:wheel, permissions 775 /Library/Preferences/testfoo/testbar with owner root:wheel, permissions 777
I saved and built the project, then ran the pkg file, which created the directories with the proper permissions.
However, if I change permissions of the directories on the disk testfoo to 777 and/or change testbar to 775 and run the pkg again, the permissions of the directories are not changed.
Am I incorrect that the "Overwrite directory permissions" option means that the permissions should be overwritten by the installation, or is this a bug? If it is not a bug, what is the correct way to ensure that the permissions end up correct if the directories already exist with wrong permissions?
@sidney-biomatters Do you have news about this ?
@kriefsacha I know nothing about this other than what I posted in the issue. I worked around it for now by writing a post-install shell script that sets the permissions correctly.
I created my pkg and it's telling me i don't have the required permissions , "Overwrite directoy permissions" is for this @sidney-biomatters ?
Issue can be reproduced and has been reported to Apple as it's an issue in Apple's installation process.
Feel free to report the issue to Apple too.
FWIW, I just tested this using Packages 1.2.8 running on MacOS 12 and it still doesn't work. The post install scripts seem to be the only workaround.
Apple's answer was that it works as designed (translation: it's broken like a lot of things in macOS and they won't fix it). This new design started with macOS Leopard.
The postinstallation script is the solution they suggest.