# /mautic/var/logs/\*.php being created by root and not www-data

**URL:** https://forum.mautic.org/t/mautic-var-logs-php-being-created-by-root-and-not-www-data/20123
**Category:** Product Support
**Created:** [July 11, 2021, 11:35am UTC](https://forum.mautic.org/t/mautic-var-logs-php-being-created-by-root-and-not-www-data/20123 "2021-07-11T11:35:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [July 11, 2021, 11:35am UTC](https://forum.mautic.org/t/mautic-var-logs-php-being-created-by-root-and-not-www-data/20123/1 "2021-07-11T11:35:54Z")

</div>

**Your software**  
My Mautic version is: 3.3.3  
My PHP version is: 7.4

I started seeing that I cannot edit emails and some other stuff inside Mautic, and when looking at the error logs, I see permission problems on the log files/

I went to /mautic/var/logs/ and saw that the logs are being generated by user root and not www-data. When I chown back to www-data everything works well again.

Any idea why this is happening ?

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [July 12, 2021, 5:13am UTC](https://forum.mautic.org/t/mautic-var-logs-php-being-created-by-root-and-not-www-data/20123/2 "2021-07-12T05:13:32Z")

</div>

Are crons running with the proper user?

---

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [July 12, 2021, 6:55am UTC](https://forum.mautic.org/t/mautic-var-logs-php-being-created-by-root-and-not-www-data/20123/3 "2021-07-12T06:55:30Z")

</div>

Hi @joeyk

crons are actually running as root, however I have not had an issue with this in the past with any other instances… but I will try and change them to www-data and see if that makes a difference.

Thanks,

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [July 12, 2021, 7:11am UTC](https://forum.mautic.org/t/mautic-var-logs-php-being-created-by-root-and-not-www-data/20123/4 "2021-07-12T07:11:44Z")

</div>

Not sure if this is the problem, but worth a shot.
