The log permission in laravel is inexplicably changed to root.

Source: Internet
Author: User
Tags logstash
The framework uses laravel, which writes some data to the log and saves it to the storage directory. the file permission is automatically changed to the root permission after a while, as a result, laravel with only the www permission cannot be written into the log. Is this the case? Operation to log... the framework uses laravel, which writes some data to the log and saves it to the storage directory. the file permission is automatically changed to the root permission after a while, as a result, laravel with only the www permission cannot be written into the log. Is this the case?

Only one logstash is used to operate on log files. you can read visual logs on a regular basis.

Reply content:

The framework uses laravel, which writes some data to the log and saves it to the storage directory. the file permission is automatically changed to the root permission after a while, as a result, laravel with only the www permission cannot be written into the log. Is this the case?

Only one logstash is used to operate on log files. you can read visual logs on a regular basis.

You may have run the artisan command using the root command. for example, if you run a scheduled task as the root user, the root log file is generated.

chown -R www:www /path/to/laravel/storageIn this way, even the root user can read and write, and www can also read and write normally.

Scheduled task? yesrootThe

It should have been used.sudo php artisan xxx:xxxI have also met

Check whether php is run as Root.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.