[GH-ISSUE #569] Stats: create stats folder in media #541

Closed
opened 2026-02-27 11:12:18 +03:00 by kerem · 7 comments
Owner

Originally created by @piwats on GitHub (Jun 11, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/569

Hello Antoine,

just run manually:

a mailadmin # python manage.py logparser
[graph] Impossible to create /var/www/mailadmin/mailadmin/media/stats/avgtraffic_global_AVERAGE_day.png graph
error: Could not save png to '/var/www/mailadmin/mailadmin/media/stats/avgtraffic_global_AVERAGE_day.png'

after creating the folder stats in media, everything is now working as it should :)

-Paul

Originally created by @piwats on GitHub (Jun 11, 2014). Original GitHub issue: https://github.com/modoboa/modoboa/issues/569 Hello Antoine, just run manually: a mailadmin # python manage.py logparser [graph] Impossible to create /var/www/mailadmin/mailadmin/media/stats/avgtraffic_global_AVERAGE_day.png graph error: Could not save png to '/var/www/mailadmin/mailadmin/media/stats/avgtraffic_global_AVERAGE_day.png' after creating the folder stats in media, everything is now working as it should :) -Paul
kerem 2026-02-27 11:12:18 +03:00
Author
Owner

@tonioo commented on GitHub (Jun 11, 2014):

This folder is automatically created when you enable the extension through the admin panel. Obviously, the user used to run modoboa (www-data?) must have write permission on the media/ directory.

<!-- gh-comment-id:45741895 --> @tonioo commented on GitHub (Jun 11, 2014): This folder is automatically created when you enable the extension through the admin panel. Obviously, the user used to run modoboa (www-data?) must have write permission on the media/ directory.
Author
Owner

@tonioo commented on GitHub (Jun 11, 2014):

Did you run the script before the extension was activated?

<!-- gh-comment-id:45758266 --> @tonioo commented on GitHub (Jun 11, 2014): Did you run the script before the extension was activated?
Author
Owner

@piwats commented on GitHub (Jun 11, 2014):

the extension was already active. It told me something like the data images couldnt be found. I ran the script, which told me, stats dir doesnt exist, so i created one. Now it works.

<!-- gh-comment-id:45779063 --> @piwats commented on GitHub (Jun 11, 2014): the extension was already active. It told me something like the data images couldnt be found. I ran the script, which told me, stats dir doesnt exist, so i created one. Now it works.
Author
Owner

@tonioo commented on GitHub (Jun 13, 2014):

Can you tell me what are the permissions of the /var/www/mailadmin/mailadmin/media directory please?

<!-- gh-comment-id:45983870 --> @tonioo commented on GitHub (Jun 13, 2014): Can you tell me what are the permissions of the /var/www/mailadmin/mailadmin/media directory please?
Author
Owner

@piwats commented on GitHub (Jun 13, 2014):

drwxr-xr-x 4 root root 4096 Jun 11 14:46 media

<!-- gh-comment-id:46018991 --> @piwats commented on GitHub (Jun 13, 2014): drwxr-xr-x 4 root root 4096 Jun 11 14:46 media
Author
Owner

@tonioo commented on GitHub (Jun 23, 2014):

Ok, so this issue is normal since modoboa can't create directories inside media.

I'll add a bit of documentation about this. I could also update the deploy command but it would require root require root privileges in order to run chmod... not really a good idea.

<!-- gh-comment-id:46891355 --> @tonioo commented on GitHub (Jun 23, 2014): Ok, so this issue is normal since modoboa can't create directories inside media. I'll add a bit of documentation about this. I could also update the deploy command but it would require root require root privileges in order to run chmod... not really a good idea.
Author
Owner

@piwats commented on GitHub (Jun 23, 2014):

This is good to know - now it does work, and future users won't get confused 👍

<!-- gh-comment-id:46916949 --> @piwats commented on GitHub (Jun 23, 2014): This is good to know - now it does work, and future users won't get confused :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#541
No description provided.