Instead of looking for solutions, I would suggest that
you should find out what the problem is first.
You have no idea whether your problem involves file permissions or not, that's just a guess. However it's quite likely that the code is throwing some kind of exception, so you should fix your application so you can find out what that exception is. Perhaps your code ignores exceptions? Perhaps it writes them to the console, but the way you deployed the application the console is invisible? Whatever the case, your first step should be to identify the problem.