File size discrepancy in Composer package

mpittcasd
Contributor

I'm trying to create a package that simply inserts a configuration file into an Applications folder directory. In the past I made a package with Composer by taking the snapshot, copying the file to where it needed to be, then capturing. This time though, I make the package and it shows that the file was modified in the right directory but the file size is off. The file I'm trying to move is reported as 179 bytes (184 bytes on disk) but when the package is run on a computer the file size is showing 179 bytes (4 KB on disk).

I don't know if this is causing the application to crash, but I have to uninstall and reinstall the app and manually copy the file to get it to work. I've tried recreating the package but get the same results. Has anyone else had this issue? I'm going to keep playing around trying to find a way to get this config file copied over in the mean time.

6 REPLIES 6

bpavlov
Honored Contributor

What's the file you are trying to move? Is it a plist file?

mpittcasd
Contributor

It's a json file.

Right now I'm trying to figure out how to mount our one smb share with a script to copy the file from. If I use the connect to server option in Finder first my script worked when run via self service policy.

mm2270
Legendary Contributor III

Say what? There really should be no need to do a copy operation from a mounted share for something as basic as a json file.
Have you tried just opening Composer, clicking Cancel if it asks for what kind of package to make, then going to the Finder and dragging the json file from its final location where it should be deployed into the Sources sidebar in Composer? That should copy the file into a brand new source with the name of the file. (You can rename it later) Then build your package from there.

mpittcasd
Contributor

You just made my life a lot easier, but I'm still running into the issue of the app crashing for some reason.

The program I'm trying to set up is DRC Insight. Before, I was able to set up the package essentially the way you said to but in a more complex manner and the Policy would run without any issues. We had to get an updated configuration file from the state and when I try to run the policy the same way it shows that it completes successfully and I can see that the new file was put in the correct directory but the app crashes. If I copy the file manually though it will launch.

mm2270
Legendary Contributor III

I should have mentioned it in my last post but, check the owner and permissions on the file that is working, and make sure they are the same if possible in the Conposer package. You use the menus in the bottom right after selecting the file in the Conposer source to change the owner and permissions. It's possible it's just not able to read the file correctly in how it's being deployed and therefore crashing.

mpittcasd
Contributor

It works! I really appreciate your help. I just tested on my building laptop, but when I get back out to the school I will grab a few of those laptops and some of the iMacs.

I guess I should read the manual for Composer to find out what all it can do, but my limited training had worked for me so far.