Permissions problems /var/www/html/weewx after running weectl report run

103 views
Skip to first unread message

jterr...@gmail.com

unread,
Apr 2, 2024, 12:37:04 PMApr 2
to weewx-user
Hello,

I am configuring a new raspberry Pi 5 with Weewx 5.02.  One of the skin I am using is producing  daily , monthly and yearly html files,  and during the first run, it take a while to generate all this files.  
With weewxd rot running, I used the command  weectl report run to run all the reports and to generate all these files.
The logged user (user = mymeteo)  is belonging to the weewx group, and before running  weectl report run I verified that the folder /var/www/html/weewx has permission 664 with owner=weewx and group = weewx.

I observed that all the files generated by weectl report in /var/www/html/weewx and subfolders have a  644 permission with owner=mymeteo and group = weewx., meaning that user weewx , and therefore weewxd, will not able to modify these files!

I had to change the permissions of the HTML_ROOT folder according to the weewx wiki  to bring bad the 664 permission for owner : weewx and group:weewx.

But... another problem : while running weewx, the new files modified or generated by weewx.engine.StdReport in /var/www/html/weewx will have permission 644 for owner:weewx and group:weewx. So  wee report, launched with the account mymeteo will no more be able to update files.

Is it a bug, or some bad settings in my system ?The best would be to have permission=664 when weewx or weectl reports are writing or modifying files  in HTML_ROOT 


jterr...@gmail.com

unread,
Apr 2, 2024, 12:53:48 PMApr 2
to weewx-user
I forgot to say that I installed weewx according to http://www.weewx.com/docs/5.0/quickstarts/debian/   on  Debian GNU/Linux 12 (bookworm)



vince

unread,
Apr 2, 2024, 1:20:04 PMApr 2
to weewx-user
Try setting your umask for the meteo account perhaps ?

Once the files are generated initially would user meteo ever need to run weectl report again ?

jterr...@gmail.com

unread,
Apr 2, 2024, 1:43:53 PMApr 2
to weewx-user
Thanks Vince,

Umask setting is way to go, and in that case it could be good that weewx documentation mention that point!  Particularly because  the umask must also  be configured for user weewx.

For my minimalist setup, where the meteo user is only here to control and use various weectl options, it would be OK; provided that the user weewx has the right setting for umask.
But imagine a more wide system, where it is not necessaly desirable that the user lauching weectl  has a 664 permission for all the files that it may produce, even outside weewx ...

Finally, in the past, while exploring or testing various skins , I used from time to time the "old" wee_reports from V 4.x, and the new weectl reports can be very useful on many occasions !

jterr...@gmail.com

unread,
Apr 3, 2024, 5:19:40 AMApr 3
to weewx-user
As a followup, I finally reinstalled weewx using pip  : no more permission problems.

Le mardi 2 avril 2024 à 19:20:04 UTC+2, vince a écrit :
Reply all
Reply to author
Forward
0 new messages