Permission Denied When Unlocking Folders (lots of custom fonts break macOS sandbox)

Support for macOS users
Post Reply
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Permission Denied When Unlocking Folders (lots of custom fonts break macOS sandbox)

Post by badbadbad »

I keep getting "Permission denied: [PATH] (rwx--------)" every time I try to unlock a folder for permissions.

Was working when first installed, but no longer works. Haven't changed any permission settings on SMB share.

Downloaded through Mac App Store, running on macOS Sierra (10.12.5).

Here's a screenshot: https://www.dropbox.com/s/q8co5fna19opk ... 9.jpg?dl=0
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

1.
Here's some things you can try to narrow down the problem:
  1. Does it work for files in your home folder?
  2. Does it work for other shares on the same NAS?
  3. Have you tried creating a new pristine share on the NAS and see if that works?
  4. Have you tried using AFS instead of SMB as network share protocol?

2.
Please post the error log. It may contain useful information about the error. You will find it here:

Code: Select all

$HOME/Library/Containers/net.filebot.FileBot/Data/Library/Application Support/User Data
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

1. I haven't tried that before, but I just did and it doesn't seem to work, put some media files on local Desktop, and still get the same permission denied error.
2. It does not work on other shares, same error.
3. Tried that now, did not work, same exact error.
4. I did, half the time I tried same error, the other half it's looking for SMB share and gives me a "cannot find XYZ server" when connected to AFP instead.

Another thing, when I get this error, it ends up creating these folders in my /Volumes/ folder: https://www.dropbox.com/s/cqddrfyjk2eiq ... 5.jpg?dl=0.

Here's the error log: https://www.dropbox.com/s/f43xycu2hsk5r ... r.log?dl=1
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

Not being able to access files in your own $HOME folder is very strange. Looking at the Finder screenshot, even Finder seems to think there's something wrong with folder permissions, since it's using the Access Denied folder icon.

Unfortunately, there's not much FileBot can do. The OS just doesn't allow FileBot to access those folders for some reason. If you use Google, you might be able to find others with similar issues (it's not a problem specific to FileBot) and maybe some possible workarounds.
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

I think looking at the screenshot, it seems that the folders Filebot is creating have messed up permissions, in the same way it's confused about the other permissions.

This was working in the past, just not anymore. I haven't faced any permissions-related issues on my computer for years and everything else I do on it seems to be operational as intended, SMB/NAS related or otherwise.

- I booted into recovery mode and did a disk repair on the boot disk, it had no issues whatsoever, the issue remains. I'd take a good guess that this is a FileBot issue.
- I tried running FileBot on the same video file in other folders, with different types of permissions, getting the same error.
- I did a ton of Googling, was not able to find anyone with the same issue, unfortunately.

I'd be really appreciative if you could investigate this a little more, for a paying customer.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

This screenshot shows macOS mount folders, so they haven't been created by FileBot, but by macOS when you mounted the network share:
https://www.dropbox.com/s/cqddrfyjk2eiq ... 5.jpg?dl=0

This looks strange to me, having 5 folders for the same share. If macOS shows "Access Denied" on a folder icon on a mount folder, then I don't think that it's related to FileBot, since FileBot is not running and has not created or touched these folders. Why are there folders Media-1 to Media-4? Can you open them with Finder? Did you create them?

Permissions issues are of course tricky. My next step would be trying this on a second clean computer, to see if it works, so you can narrow down the issue to either your machine, or the NAS. My guess would be that your system is screwed up in some strange way.

It could be anything, maybe a strange internal issue of macOS. Problem is that there's absolutely nothing I can do about it. No change in the code of FileBot could possibly magically solve this issue on your machine, since FileBot is working correctly, yet denied access by the operating system.

Do you have a second Mac (preferably clean install) you could try FileBot on to see if it works there?

Note that FileBot works for me and everyone else, so there must be something that's different on your system. A Factory Reset would probably solve the problem.
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

Thanks for getting back to me.

As for the screenshot, those folders did not exist before pressing "Rename" on FileBot. When the unlock dialog pops up, and I drag the folders required inside the "Media" share, it's only then when those folders are created, they're not created before that point. Strange indeed, but I think what's more strange is how the same error can be replicated locally without any network shares involved.

I just installed FileBot on a new MacBook I got last week (clean install), barely touched. I used the same video file along with another one too, put them on Desktop and the error still appears.

Here's what I think, when I try unlocking a folder, I get these messages in the Console, I'm pretty sure it's being blocked by the Sandbox. Here's what I get: https://www.dropbox.com/s/iphjarg2x6jut ... 7.jpg?dl=0.

Here's a short video of me replicating this with the errors in Console: https://www.dropbox.com/s/7hs70hfovg6f4 ... t.mov?dl=0

Could this be a Sandbox-related issue?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

It's most certainly a sandbox-related issue, but that's on the macOS side, that I can't do much about.

FileBot couldn't possibly create folders in /Volume since the sandbox would deny permission to do that as well. But if somehow folders get created by FileBot doing something, then it's probably somehow indirectly related, somewhere deep inside macOS, some strange bug. I've never seen this before.

So you're saying you've tried it on the a factory reset 100% pristine with no extra software installed latest version of macOS and it doesn't work? That would mean that it fundamentally doesn't work, for anybody, yet it seems to work for mostly everyone else... so no clue what might be different for you. Maybe your account name? Maybe your physical location? Maybe the CIA is hacking you? Maybe a cosmic ray flipped a bit? I honestly have no idea. I don't understand how it could possibly not work on a pristine factory reset system...


Try this:

1. Factory reset computer
2. Go to Movies folder and create empty file "Avatar.avi"
3. Open App Store and install FileBot
4. Run FileBot and drop in Movies folder, Match and Rename and see if that works
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

Haha, don't think it's any of the latter causes. It's strange as it was working some time back, just not anymore.

I tried it on a near-clean install, it's a new MacBook, only thing I did on that laptop was add my email account and installed Google Chrome (don't use Chrome on my iMac though), haven't had the time or the chance to do anything else really.

I'm leaning towards FileBot creating those folders. One of the presets I have in FileBot is to rename and move to specific folders that are in /Volumes/Media/Shows...etc. Since it's not able to access those folders, thinking they're not there, it's probably creating them? Probably a strange bug like you say.

I have taken the extra mile and disabled SIP on my computer and the error is still there. I don't think I'll be able to do a factory reset at the moment, unfortunately.

Shit out of luck, I guess?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

Well, lots and lots of things we could try... :lol:


1.
Create a new empty file "Avatar.avi" in your $HOME/Movies folder. We create a new file in an existing default folder to eliminate the possibility of an existing file being tainted in some way.

2.
Use the "Load" button and then select the "Movies" folder. We use the "Load" button to eliminate DnD issues and we select the folder instead of the file to eliminate some potential sandbox-permission issues.

3.
Keep the default format, to only rename the file in the Movies folder without moving it to another folder, so we can see if it works, avoiding any potential issues of accessing other folders.
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

Just tried your suggestion, I'm afraid same result, here's what I get: https://www.dropbox.com/s/y1cpn65w91xxy ... 1.jpg?dl=0.

I have never used the Movies folder for anything, ever, it's clean. Did the "Load" option too, same result. One more thing I tried was to copy the Avatar.avi and the original show file to two other internal drives I have on this machine (one SSD and another HD), same result for both files on both internal drives other than boot drive.

Got any other suggestions? This is making me super curious as to what could be the root of the problem!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

You probably already tried uninstalling and reinstalling FileBot via the App Store? Maybe Apple screwed something up, like the expired certificate thing a few years ago that broke lots of apps.

It's definitely the sandbox, blocking file access, but if you use DnD or a File Chooser, then macOS should the app permission, which for some reason doesn't seem to be happening on your machine. Maybe macOS has more logs somewhere that could give us a hint?
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

Tried reinstalling from MAS, same result. Also tried installing and trying on work computer, different network and location, same result.

BUT, tried something really weird and it seems to have fixed the problem, need to replicate at home to verify. Will report back in a few hours. It's the strangest thing, no way we could have guessed this.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

badbadbad wrote: 30 Jul 2017, 12:35 It's the strangest thing, no way we could have guessed this.
I'm really really curious now! :ugeek:
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

Holy shit, it worked!

When I installed FileBot on my work computer, I noticed this in Console: https://www.dropbox.com/s/v0xdmf1sr3q9r ... 8.jpg?dl=0. Those line items only appear when FileBot is starting up, not afterwards. That's why I never noticed them before, I always launched Console after FileBot was up and running.

I thought this might be a fonts issue, only thing I did since I purchased FileBot was that I installed RightFont and put all my fonts in Dropbox, they're all activated, at about 3,000~ fonts. My work computer, home computer, and laptop have Dropbox installed and have all my files synced up. Don't have RightFont installed on my new laptop though.

I also noticed FileBot took some time to start up.

At work, I put the fonts folder (that's in Dropbox) in a compressed file, and deleted the folder and emptied the trash, and FileBot worked on my work computer! I came back home, did the same, and it worked too! Not only that, but when it was sorted, FileBot would start up much faster, like almost instantly as opposed to ten or more seconds.

I did some reading and apparently Sandbox on macOS has limits to how many fonts can be activated at once(?) or how many fonts can be activated or loaded up within one app(?), one or the other is what I understood.

The fonts errors on Console were a few, but not all my fonts, they were about 30-40, and randomly selected it seems. I checked those specific error fonts and they didn't look weird or have any permission errors.

I cleaned up some old fonts, deleted several others, deleted ones I don't need, used FontNuke to delete font caches, rebooted, and now FileBot works.

What do you think? 8-)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

Very interesting! I suppose some lower level component of macOS is loading all the fonts and exceeds the maximum number of allowed files, or something like that, so FileBot somehow can't open anything else because of some kind of low level resource restriction.

It's kinda scary that FileBot would somehow indirectly (!) via macOS internals access random fonts in random folders. The macOS sandbox should actually prohibit access to random files (and maybe it does and that's why it's launching so slowly, getting lots of access denied errors internally).

There's no way I could have narrowed it down to this without hands on the keyboard trying random stuff. Kinda what I meant by not being able to help much with these kinds of issues. :lol:
:idea: Please read the FAQ and How to Request Help.
badbadbad
Posts: 9
Joined: 28 Jul 2017, 20:48

Re: Permission Denied When Unlocking Folders

Post by badbadbad »

Seems like it, I'll monitor if other applications are having the same problem in Console. Not sure if this situation would help you with anything on FileBot's code, but either way, glad it's sorted. Thanks!
Last edited by badbadbad on 30 Jul 2017, 18:14, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Permission Denied When Unlocking Folders

Post by rednoah »

Unfortunately, that's definitely not something that can be fixed in my code... Maybe in some of the underlying frameworks. Not much I can do other than reporting this a bug to Apple.
:idea: Please read the FAQ and How to Request Help.
Post Reply