Honestpuck / homebrew.sh

Install homebrew via Jamf without giving users admin rights
Apache License 2.0
107 stars 30 forks source link

Script result: Error: /usr/local is not writable. #4

Closed MattyRepo1 closed 3 years ago

MattyRepo1 commented 3 years ago

Hi

I am getting the below error when deploying this scrip as a policy within Jamf Pro

Script result: Error: /usr/local is not writable. You should change the ownership and permissions of /usr/local back to your user account: sudo chown -R $(whoami) /usr/local

Many Thanks for any support that you can provide.

Honestpuck commented 3 years ago

Matty,

Could you tell me which OS you are seeing the problem on? Is it all Macs or only one or two? What do you see if you run ls -ld /usr/local on the Mac in question?

MattyRepo1 commented 3 years ago

I am running this on Mac OS Catalina 10.15.7On 23 Nov 2020 07:56, Tony Williams notifications@github.com wrote: Matty, Could you tell me which OS you are seeing the problem on? Is it all Macs or only one or two? What do you see if you run ls -ld /usr/local on the Mac in question?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Honestpuck commented 3 years ago

Matty,

Can you answer all the questions, please.

MattyRepo1 commented 3 years ago

After running ls -ld /usr/local I get the below resultsdrwxr-xr-s 31 root wheel 992 It is currently just been tested on 1 iMac running Catalina 10.15.7 On 23 Nov 2020 21:24, Tony Williams notifications@github.com wrote: Matty, Can you answer all the questions, please.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Honestpuck commented 3 years ago

OK, it looks like some other software has changed the permissions of /usr/local, it shouldn't be setuid. Try it on a clean Mac and it should work. If you are running the script it's best to do it early in the build process as it relies on a clean system.

MattyRepo1 commented 3 years ago

Thank you Tony, I will try this and get back to you with an update. Can you tell me what the permission from /use/local should read? On 23 Nov 2020 22:38, Tony Williams notifications@github.com wrote: OK, it looks like some other software has changed the permissions of /usr/local, it shouldn't be setuid. Try it on a clean Mac and it should work. If you are running the script it's best to do it early in the build process as it relies on a clean system.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

MattyRepo1 commented 3 years ago

This resolved the issue I was having thank you. On another note if I wanted to add a command to install python after brew has installed where would I do this? Can I just add the terminal command brew install python?On 23 Nov 2020 22:38, Tony Williams notifications@github.com wrote: OK, it looks like some other software has changed the permissions of /usr/local, it shouldn't be setuid. Try it on a clean Mac and it should work. If you are running the script it's best to do it early in the build process as it relies on a clean system.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.