railsfactory-manikandant / munki

Automatically exported from code.google.com/p/munki
Other
0 stars 0 forks source link

App with 700 permissions doesn't install correctly #388

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

On 10.9.4 I’m trying to install Remotix via munki (managedsoftwareupdate 
2.0.0.2212). When downloaded from the vendor (http://nulana.com/remotix-mac/) 
the app in the dmg has 700 permissions. 

On the client, munki downloads the dmg normally. When I install it I see:

sudo managedsoftwareupdate --installonly –vvvv
Installing Remotix (1 of 1)...
    Mounting disk image Remotix-2.1.4.dmg...
    Copying Remotix.app to /Applications/Remotix.app...
    Setting owner for '/Applications/Remotix.app' to 'root'
    Setting group for '/Applications/Remotix.app' to 'admin'
    Setting mode for '/Applications/Remotix.app' to 'o-w'
    The software was successfully installed.

The problem is the size of Remotix.app is 0 KB and the permissions are 
obviously incorrect. If I open the dmg in /Library/Managed\ 
Installs/Cache/Remotix-2.1.4.dmg and drag the app into /Applications it 
installs normally and opens and the size is correct.

To work around this, I first installed the Remotix.app into /Applications and 
then ran sudo chmod -R 755 /Applications/Remotix.app
After reimporting via munkiimport, munki then correctly installed the app. 

I understand the 700 permissions on the app in the dmg is a vendor issue and I 
already asked them to look at that. I don't understand why munki doesn't 
correctly install the app even with incorrect permissions? Is the incorrect 
permissions preventing the app from displaying its correct size? 

Thanks to Nick McSpadden for looking into this issue with me.

Marnin

Original issue reported on code.google.com by gmar...@gmail.com on 16 Sep 2014 at 8:04

GoogleCodeExporter commented 9 years ago
I don't think there is a defect here.

See: https://code.google.com/p/munki/wiki/SupportedPkginfoKeys#items_to_copy

If you don't want Munki to copy the mode as it exists on the disk image, set 
the mode key to whatever you'd like. This will allow you to work around the 
issue (you could also use a postinstall_script if you'd like or need more 
complex mode/owner/group info).

If you _manually_ copy an item from a disk image, it assumes the ownership of 
the user doing the copy, so if you are logged in as gmarnin, the copied item 
will be owned by gmarnin. Even though it has a mode of 700, gmarnin will be 
able to read, write and execute.

Munki installs as root, so only root would have read. write and execute.

Original comment by gregnea...@mac.com on 16 Sep 2014 at 11:05