Hey guys, I need to write to the Plugin’s folder on OSX. I can use the following code to run a script, so I wonder if I could just change the folder’s permissions so my JUCE App will be able to write files there.
Ok, my question is, can I use the script to change the permission of the global plugin’s folder so I can copy my plugins there? And do I need to change permissions back to what they were or is it ok to leave it like that?
Do I just run chmod 777 or I need to do something else? Sorry, I’m really not used to file permissions on OSX.
I wouldn’t do this. Why not just copy the plugins using STPrivilegedTask? Also I hope that you don’t literally have a .sh file that you execute using that, because then would be trivial to mess about with your installer to run stuff as root.
I have reservations about the need/reason for a custom installer, it’s really not “usual” under macOS, and I pretty much always cringe when presented with something that’s not the default installer, however I assume you have a reason other than “because I wanted to” for going down that route?
The documentation for building installer packages is pretty crap tbh (at least I couldn’t find anything useful online, JUCE forum was the most helpful!), but this provides a good example to follow, or there is Packages, which is really just a GUI wrapper around the built in tools, much better to learn those imo.
I had a look at my /Library/Audio/Plug-Ins folder, and it looks like already some silly installer has gone a changed the permissions for my VST3 folder to 777 and left it like that!
Within the various folders there is a mix of plugins that are 755 and 777 with a couple of 700s, some are owned by $USER:wheel, some by $USER:admin, some by $USER:staff and a few by root:wheel!
imo 777 is a bad idea, it allows anyone to write to the folder, and really the only time you want 777 is because you can’t be bothered to get the permissions structure correct because you’re in a hurry (I’ve done it a million times in VMs used for local web dev; just quicker and easier to 777 the relevant paths to get it working)
Mine are non-existent… I’ve searched through the net to no avail. @WilliamkWusik Did you ever get around this? Any help is much appreciated! I’m in a process of creating a custom installer too but for now can’t do it due to Mac OS system for this… :s