Same code, executes through browser, throws a permission error through command line

Posted on

Same code, executes through browser, throws a permission error through command line – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, php, file-permissions, , .

I’ve got an app that works fine in the browser, but when run through the command line, throws a permission error (related to folder creation).

What could be the reason?

Solution :

The fact that it will run as the apache user when you execute it in the browser and as another user when you started it from the command line, which might not have access rights in all the necessary directories.

Leave a Reply

Your email address will not be published.