Outset throwing a bad permissions error

wtm001
New Contributor

When testing outset I get a bad permissions error. Anyone come across this? I have them set to 755, thanks!

Bad permissions: /usr/local/outset/login-once/dockutilscript.sh

22 REPLIES 22

davidacland
Honored Contributor II
Honored Contributor II

The script shouldn't care as long as it has read and execute, but the LaunchDaemons / LaunchAgents have to be exact otherwise you'll get that error. Does Outset use a LaunchAgent to do its thing?

wtm001
New Contributor

I'm not really sure about that, sorry I'm new to all of this. After imaging the machine I can login and see that the dock hasn't changed (the dock is what I'm changing with outset). I click the outset executable file and get this error:

outset: error: one of the arguments --boot --login, etc is required.

I'm sure it's something really simple that I'm overlooking. Thanks.

76b46952a4334f528916d28e2b8c7dd1
822e15ae847f41c48d1f511033907c6a

davidacland
Honored Contributor II
Honored Contributor II

What is the file you're clicking?

I click the outset executable file and get this error

Outset would normally just run anything in the login-once folder so the error is sounding like it's not related.

wtm001
New Contributor

The outset file here. I'm guessing this is what runs when you login?

6dbf8d58b882472690950234b17f8e18

davidacland
Honored Contributor II
Honored Contributor II

Thats the one. I f you run it manually, it expects extra options to tell it what to do (like --login or similar).

In this case, I would normally add some kind of logging to the script so you can at least tell if it is running or not. If you add a few lines like this:

echo "script has run" >> /Library/Logs/dockscript.log

You will get a log file in that location that will let you know if it's being triggered.

Outset is only able to run the script, so if it is running ok but not having the desired effect, it may be something in the script.

wtm001
New Contributor

It appears to not run, I added the line to the script and it's not showing. I did run the script manually and it worked, but didn't create the log file because of a permissions error.

49400b0813df4d9ba747e55811a43d04

millersc
Valued Contributor

Have you tired to run the dockutilscript.sh manually? Looks like a dockutil error may be showing itself.

Can you post the dockutilscript.sh also?

wtm001
New Contributor

Yeah it works fine if I run it manually.

Posting a screenshot too.

8f202cab771d48679160aea45455f506

!/bin/bash

Remove all apps

/usr/local/bin/dockutil --remove all --no-restart

Add apps

/usr/local/bin/dockutil --add /Applications/Launchpad.app /usr/local/bin/dockutil --add /Applications/Safari.app /usr/local/bin/dockutil --add /Applications/Firefox.app /usr/local/bin/dockutil --add /Applications/Google Chrome.app /usr/local/bin/dockutil --add /Applications/Notes.app /usr/local/bin/dockutil --add /Applications/Calendar.app /usr/local/bin/dockutil --add /Applications/Microsoft Word.app /usr/local/bin/dockutil --add /Applications/Microsoft Excel.app /usr/local/bin/dockutil --add /Applications/Microsoft PowerPoint.app /usr/local/bin/dockutil --add /Applications/Managed Software Center.app /usr/local/bin/dockutil --add /Applications/System Preferences.app /usr/local/bin/dockutil --add '~/Downloads' --view list

exit 0

millersc
Valued Contributor

Remove the 'exit 0' from the script and try. That's the line number the error is calling on. Line 22.

wtm001
New Contributor

Sorry about that. I posted an old edit, line 22 is actually different.

056830e0924d4f9ba0360aa31523b543

wtm001
New Contributor

but it won't run without that line 22 either

davidacland
Honored Contributor II
Honored Contributor II

That all looks correct. Scripts in the login-once folder run in the user context so that shouldn't be affecting it. I compared your script to the example here: https://github.com/chilcote/outset/wiki/Dockutil

All looks the same (or similar)

The error about writing to the log file is normal if you run it manually. That being said, if you're running a login-once script, the user probably doesn't have the permissions to write to it either. Try setting the log file location to somewhere the user can write to (possibly /Users/Shared) and try again. Outset may be running the script after all.

wtm001
New Contributor

Yep that works. I can run the script manually and the log file outputs to the /Users/Shared folder, but I'm still getting

Bad permissions: /usr/local/outset/login-once/dockutilscript.sh when doing /usr/local/outset/outset --login

So, we've verified that the script is working. What else could it be?

davidacland
Honored Contributor II
Honored Contributor II

What output do you get in Terminal if you run /usr/local/outset/outset --login-once?

wtm001
New Contributor

4931bdaa3d6e4f70b8a100cbb99136c3

The log file DOES NOT get created either.

davidacland
Honored Contributor II
Honored Contributor II

Looks like it's an Outset specific error thats complaining about the executable bit on the dockutil script.

There's a comment here about setting that permission:

https://github.com/chilcote/outset/issues/21

wtm001
New Contributor

I read that yesterday. He says that it's been fixed, but it's still not working for me.

/usr/local/outset/outset --login-once returns the bad permissions error

BUT

sudo /usr/local/outset/outset --login-once works

wtm001
New Contributor

I tried outset version 2.0.1 for the hell of it and I'm having the same issues. Anyone else have any suggestions?

apizz
Valued Contributor

Have you checked the permissions of the dockutil executable?

Do an ls -lah /usr/local/outset

wtm001
New Contributor

a75921bd3e8542c6a334b44f60d29a07

daafin3
New Contributor II

For people still running into this issue; this is how I resolved the issue:

sudo chown -R root:admin /usr/local/outset/
sudo chmod -R 755 /usr/local/outset/

JasonAtCSUMB
Contributor

"Bad permissions" error is from the outset code itself. According to the outset code, the ownership and mode of the the scripts, et al, must match the directory: root and 755, apparently.