I installed a Safari extension. I need to allow this extension to access files on mu system. Chrome has option looking like this:

enter image description here

I want the same for Safari. Where can I do this?

1 Answer 1


There is no way to enable this. Safari extensions are restricted to accessing the extensions folder and nowhere else.

If you need to access local resources, use safari.extension.baseURI + “relative path and filename”. You cannot access resources on the user’s hard drive outside of the extensions folder.

Source: Injecting Scripts - Safari Extensions Development Guide

  • Thank you. I am indeed trying to inject user script. For that I use Tampermonkey. Could you provide an example of how to use safari.extension.baseURI? I do not know what baseURI is for this extension. Where can I learn it?
    – sanjihan
    Commented May 22, 2016 at 17:00
  • @sanjihan I don't know how to do this since Tampermonkey scripts are injected on to the page and run as if the page executes them, and pages can't access safari.extension (only the extension code itself). You could look into creating a new extension which would give you access?
    – grg
    Commented May 22, 2016 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .