# More OSX File Permissions Stuff

**URL:** <https://forum.juce.com/t/more-osx-file-permissions-stuff/33728>\
**Category:** MacOSX and iOS\
**Created:** [June 4, 2019, 2:41pm UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728 "2019-06-04T14:41:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WilliamkWusik](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/williamkwusik/32/3821_2.png) [@WilliamkWusik](https://forum.juce.com/u/WilliamkWusik)\
**Post date:** [June 4, 2019, 2:41pm UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/1 "2019-06-04T14:41:17Z")

</div>

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.

> **[sveinbjornt/STPrivilegedTask](https://github.com/sveinbjornt/STPrivilegedTask)**
>
> An NSTask-like wrapper around the macOS Security Framework's AuthorizationExecuteWithPrivileges() to run shell commands with root privileges in Objective-C / Cocoa. - sveinbjornt/STPrivilegedTask

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.

Thank you for any help.

Cheers, WilliamK

---

<div class="post-metadata">

**Author:** ![asimilon](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/asimilon/32/4235_2.png) [@asimilon](https://forum.juce.com/u/asimilon)\
**Post date:** [June 4, 2019, 3:24pm UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/2 "2019-06-04T15:24:44Z")

</div>

> [@WilliamkWusik](#):
>
> change the permission of the global plugin’s folder so I can copy my plugins there

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](https://github.com/kurasu/surge/tree/master/installer_mac) provides a good example to follow, or there is [Packages](http://s.sudre.free.fr/Software/Packages/about.html), 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)

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [June 5, 2019, 8:57am UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/3 "2019-06-05T08:57:18Z")

</div>

If you have an AuthorizationRef you don’t need to change the permissions of the folder.

Rail

---

<div class="post-metadata">

**Author:** ![WilliamkWusik](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/williamkwusik/32/3821_2.png) [@WilliamkWusik](https://forum.juce.com/u/WilliamkWusik)\
**Post date:** [June 5, 2019, 1:22pm UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/4 "2019-06-05T13:22:30Z")

</div>

> [@Rail\_Jon\_Rogut](#):
>
> AuthorizationRef

The thing is, how do I make it work with JUCE? 😉

Thanks

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [June 5, 2019, 8:35pm UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/5 "2019-06-05T20:35:52Z")

</div>

How are your ObjectiveC skills?

Rail

---

<div class="post-metadata">

**Author:** ![kaukomedia](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@kaukomedia](https://forum.juce.com/u/kaukomedia)\
**Post date:** [July 4, 2020, 8:24am UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/6 "2020-07-04T08:24:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WilliamkWusik](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/williamkwusik/32/3821_2.png) [@WilliamkWusik](https://forum.juce.com/u/WilliamkWusik)\
**Post date:** [July 13, 2020, 7:02pm UTC](https://forum.juce.com/t/more-osx-file-permissions-stuff/33728/7 "2020-07-13T19:02:46Z")

</div>

Nope, OSX is a mess to be honest, and now Apple made it even worse. So I’m giving Apple the finger and I don’t plan on supporting any new OSX updates. ☹
