Page 1 of 1

Could Not Save Rules

PostPosted: Sun Nov 05, 2017 11:55 am
by RLembke
Good morning -

I had a hard drive failure on my iMac and I'm slowly getting everything reinstalled. Hazel has been reinstalled, license reloaded and now I'm having issues trying to restore my rules. In fact, I'm having trouble even writing new rules.

Since I'm having the same error with restored or new rules, I'll just describe the "new rule" issue I'm seeing.

When I try to create a new rule, I click the "+" sign, select a folder, and I'm greeted with a pop up that says "Could not save rules" with the sub-message - "There was an error saving rules for one or more folders." A triangle pops up next to the folder name in the rules window. When I hover over it, the message says, "You don't have permission to save the file "1673454-234234.hazelrules" in the folder "Hazel". That's not the real number but gives the idea.

The only Hazel folder I'm aware of is in Library/Application Support so I checked the permissions on that folder. Everything seems to be in order.

What else can I try to address this issue? I get this same error if I try to restore my rules from my backup. Thanks in advance!

Re: Could Not Save Rules

PostPosted: Mon Nov 06, 2017 11:40 am
by Mr_Noodle
Can you post the output of the following commands?

ls -l ~/Library/Application Support/Hazel

and

ls -ld ~/Library/Application Support/Hazel

Re: Could Not Save Rules

PostPosted: Mon Nov 06, 2017 10:18 pm
by RLembke
Sure.......I see where we might have a problem here...

Robs-iMac:~ rob$ ls -l ~/Library/Application Support/Hazel
ls: /Users/rob/Library/Application: No such file or directory
ls: Support/Hazel: No such file or directory
Robs-iMac:~ rob$ ls -ld ~/Library/Application Support/Hazel
ls: /Users/rob/Library/Application: No such file or directory
ls: Support/Hazel: No such file or directory

Re: Could Not Save Rules

PostPosted: Tue Nov 07, 2017 11:22 am
by Mr_Noodle
Oh whoops. My fault. Try these commands:
Code: Select all
    ls -l ~/Library/Application\ Support/Hazel

and
Code: Select all
    ls -ld ~/Library/Application\ Support/Hazel

Re: Could Not Save Rules

PostPosted: Thu Nov 09, 2017 12:07 am
by RLembke
Robs-iMac:~ rob$ ls -l ~/Library/Application\ Support/Hazel
total 176
-rw-r--r--@ 1 rob staff 352 Sep 26 19:32 16777224-1069470.hazeldb
-rw-r--r--@ 1 rob staff 865 May 17 07:42 16777224-1069470.hazellocalrulesdb
-rw-r--r--@ 1 rob staff 4546 May 17 07:42 16777224-1069470.hazelrules
-rw-r--r--@ 1 rob staff 7161 Apr 8 2017 16777224-1227883.hazeldb
-rw-r--r--@ 1 rob staff 2349 May 17 07:42 16777224-1227883.hazellocalrulesdb
-rw-r--r--@ 1 rob staff 43919 May 17 07:42 16777224-1227883.hazelrules
drwxr-xr-x@ 4 rob staff 136 May 17 07:42 backup v20
-rw-------@ 1 rob staff 652 Aug 17 2016 license
-rw-r--r--@ 1 rob staff 2222 Jan 16 2017 trash-298671F5-3688-3EB4-B2F3-E19597172BC9-501.hazeldb
-rw-r--r--@ 1 rob staff 1862 Oct 6 19:04 trash-AC2CEF30-9BF5-3B13-B53C-92ED3CED0C4B-.Trash.hazeldb
-rw-r--r--@ 1 rob staff 1436 Dec 16 2016 trash-F7E8DD18-D6FC-384F-8B95-F02CF35AB316-501.hazeldb
Robs-iMac:~ rob$ ls -ld ~/Library/Application\ Support/Hazel
drwxr-xr-x@ 16 rob staff 544 Oct 6 19:04 /Users/rob/Library/Application Support/Hazel
Robs-iMac:~ rob$

Re: Could Not Save Rules

PostPosted: Thu Nov 09, 2017 10:59 am
by Mr_Noodle
It looks like you should be able to write there. Can you copy a file into that folder in Finder without any sort of password prompt?

Re: Could Not Save Rules

PostPosted: Thu Nov 09, 2017 9:10 pm
by RLembke
No, it pops up window making me authenticate. Says it needs an administrator password. I'm the main administrator.

Re: Could Not Save Rules

PostPosted: Fri Nov 10, 2017 11:40 am
by Mr_Noodle
You'll need to look into the file ownership and permissions there as Hazel won't be able to write files there if a password is required. You need to make sure that the user Hazel runs under is the same as the one that owns that folder and the files within. Also, check for ACLs (google it) if you can't figure out any other reason for the permissions being off.

Re: Could Not Save Rules

PostPosted: Sat Nov 11, 2017 11:09 am
by RLembke
I couldn't get anything to work messing with the permissions. Maybe I should have mentioned this sooner but I wonder if it wasn't the cause - I tried the restore guidelines from here when I first installed Hazel again and I wonder if replacing the Hazel folder in Application Support messed things up.

Uninstalled/reinstalled Hazel but instead of doing the restore I just did "import rules" and picked the rules file from my old Application Support/Hazel folder. Seems to have done the trick.

Thanks for the help.

Re: Could Not Save Rules

PostPosted: Mon Nov 13, 2017 12:01 pm
by Mr_Noodle
Those instructions should work but there may be some odd issue with the user accounts not matching up between your backup and current machine. In any case, glad you got it working.