How to start a Caddy from the user _www in MacOS?

Hello everyone!

What is the path to the global directory (for example: /usr/local/bin etc.) for binary files in MacOS?

The problem is that I can run the command from another user. With this command I want to start the Caddy web-server: su _www -c caddy

I know where this file is located. The problem is that Caddy can only work with PHP socket if the Caddy process is running from the user _www. But if I switch to _www user (this is not a problem), I can not start the process, because the Caddy file is in the PATH of another user.

Of course I can send the file to another user to run, but this is too long and inconvenient process. I just need to start the process from the right user. In Ubuntu, such a problem is not surprising.

I get error: Скриншот, 26.11.2017 03:09:26 -

Thanks to everyone who helped.

The problem is solved. It was enough to put a binary file Caddy in the directory: /usr/local/bin

If the binary file is in the directory /usr/local/bin, Caddy available for reading for user _www

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.