Of course your code should handle any permission failures gracefully, but beyond that it's sort of out of your control. As part of the installation of your application,
you should ensure that the appropriate file structures have the required permissions.