A
A
Alexey Bespalov2014-08-08 12:57:46
linux
Alexey Bespalov, 2014-08-08 12:57:46

How to stop doing chmod and start living?

Hello.
I have such a problem. There is a folder on the server where the application (PHP, Laravel) writes logs.
One day - one file of the runtime.DD.MM.YYY.log.
And every day I have to chmod write permissions to this folder, because file not opened: permission denied.
I already set the owner of the folder, nginx:nginxbut the problem has not disappeared.
I will be grateful for your advice.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2014-08-08
@cold_brain

Try using the umask command, with its help you can set a mask with rights to newly created files and directories.

K
kompi, 2014-08-08
@kompi

And here nginx...
Who is responsible for php, apache or fpm? Here they have and edit user / group in the configs.
Wangyu: this php-cli writes crontab logs with default user/group.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question