Hi Matthew As said I made e new installation (Raspi4, bullseye) now version 5.0.2-1 according installation guide.
Weewx installs: Entpacken von weewx (5.0.2-1) ... weewx (5.0.2-1) wird eingerichtet ... Using weewx:weewx as user:group Creating /etc/default/weewx Using configuration file /etc/weewx/weewx.conf Processing configuration file /etc/weewx/weewx.conf Setting record_generation to software. Saving configuration file /etc/weewx/weewx.conf Adding system group weewx...done Adding system user weewx...done Adding user wag to group weewx Installing systemd units Installing udev rules Creating skins directory /etc/weewx/skins Creating user extension directory /etc/weewx/bin/user Configuring database directory /var/lib/weewx Configuring reporting directory /var/www/html/weewx Setting permissions weewx:weewx on /etc/weewx Enabling startup using systemd Created symlink /etc/systemd/system/multi-user.target.wants/weewx.service → /lib/systemd/system/weewx.service. Starting weewxd using systemd Next step: weewx takes stored records from the weatherstation and write to database. That worked. After this the same result: Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.imagegenerator: Unable to save to file '/var/www/html/weewx/yearrx.png' [Errno 13] Keine Berechtigung: '/var/www/html/weewx/yearrx.png': Feb 13 12:40:54 hp weewxd[4425]: INFO weewx.imagegenerator: Generated 0 images for report SeasonsReport in 3.97 seconds Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.reportengine.CopyGenerator' Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** [Errno 13] Keine Berechtigung: '/var/www/html/weewx' Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** Traceback (most recent call last): Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 220, in run Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** obj.start() Feb 13 12:40:54 hp weewxd[4425]: Traceback (most recent call last): Feb 13 12:40:54 hp weewxd[4425]: File "/usr/share/weewx/weewx/reportengine.py", line 220, in run Feb 13 12:40:54 hp weewxd[4425]: obj.start() Feb 13 12:40:54 hp weewxd[4425]: File "/usr/share/weewx/weewx/reportengine.py", line 409, in start Feb 13 12:40:54 hp weewxd[4425]: self.run() Feb 13 12:40:54 hp weewxd[4425]: File "/usr/share/weewx/weewx/reportengine.py", line 560, in run Feb 13 12:40:54 hp weewxd[4425]: ncopy += weeutil.weeutil.deep_copy_path(path, html_dest_dir) Feb 13 12:40:54 hp weewxd[4425]: File "/usr/share/weewx/weeutil/weeutil.py", line 1807, in deep_copy_path Feb 13 12:40:54 hp weewxd[4425]: os.makedirs(d, exist_ok=True) Feb 13 12:40:54 hp weewxd[4425]: File "/usr/lib/python3.9/os.py", line 225, in makedirs Feb 13 12:40:54 hp weewxd[4425]: mkdir(name, mode) Feb 13 12:40:54 hp weewxd[4425]: PermissionError: [Errno 13] Keine Berechtigung: '/var/www/html/weewx' Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 409, in start Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** self.run() Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 560, in run Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** ncopy += weeutil.weeutil.deep_copy_path(path, html_dest_dir) Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** File "/usr/share/weewx/weeutil/weeutil.py", line 1807, in deep_copy_path Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** os.makedirs(d, exist_ok=True) Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** File "/usr/lib/python3.9/os.py", line 225, in makedirs Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** mkdir(name, mode) Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** PermissionError: [Errno 13] Keine Berechtigung: '/var/www/html/weewx' Feb 13 12:40:54 hp weewxd[4425]: ERROR weewx.reportengine: **** Generator terminated Next step: Gave permission acc. wiki, and restarted with "sudo systemctl start weewx". No effect ------------------------------------------------------------------------------------------------------------------- next step: ps aux|grep weewxd: weewx 4425 10.3 0.8 61488 33168 ? Ssl 12:30 2:22 python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf wag 5411 0.0 0.0 7372 556 pts/0 S+ 12:53 0:00 grep --color=auto weewxd -------------------------------------------------------------------------------------------------------------------- content as per your request content of /etc/default/weewx: WEEWX_PYTHON=python3 WEEWX_BINDIR=/usr/share/weew --------------------------------------------------- /etc/systemd/system/weewx.service no such file existing --------------------------------------------------- but found in /usr/lib/systemd/system/weewx.service: # systemd service configuration file for WeeWX [Unit] Description=WeeWX Documentation=https://weewx.com/docs Requires=time-sync.target After=time-sync.target Wants=network-online.target After=network-online.target [Service] ExecStart=weewxd /etc/weewx/weewx.conf StandardOutput=null StandardError=journal+console RuntimeDirectory=weewx RuntimeDirectoryMode=775 User=weewx Group=weewx [Install] WantedBy=multi-user.target -------------------------------------------- /etc/init.d/weewx no such file existing -------------------------------------------- next step to find files with weewx, may be it helps? $ sudo find / -type f -name "*eewx.*" /etc/weewx/weewx.conf-5.0.2 /etc/weewx/weewx.conf /etc/weewx/skins/Standard/weewx.css /etc/weewx/systemd/weewx.service /etc/weewx/logwatch/conf/services/weewx.conf /etc/weewx/logwatch/conf/logfiles/weewx.conf /etc/weewx/udev/weewx.rules /etc/weewx/rsyslog.d/weewx.conf /etc/apache2/sites-available/weewx.conf /etc/apt/trusted.gpg.d/weewx.gpg /etc/apt/sources.list.d/weewx.list /var/lib/dpkg/info/weewx.preinst /var/lib/dpkg/info/weewx.md5sums /var/lib/dpkg/info/weewx.config /var/lib/dpkg/info/weewx.list /var/lib/dpkg/info/weewx.prerm /var/lib/dpkg/info/weewx.postrm /var/lib/dpkg/info/weewx.postinst /var/lib/dpkg/info/weewx.conffiles /var/lib/dpkg/info/weewx.templates /var/lib/weewx/weewx.sdb /var/lib/apt/lists/weewx.com_apt_python3_dists_buster_main_binary-all_Packages /var/lib/apt/lists/weewx.com_apt_python3_dists_buster_InRelease /usr/lib/systemd/system/weewx.service /usr/lib/udev/rules.d/60-weewx.rules /usr/share/weewx/weewx_data/util/nginx/weewx.conf /usr/share/weewx/weewx_data/util/systemd/weewx.service /usr/share/weewx/weewx_data/util/newsyslog.d/weewx.conf /usr/share/weewx/weewx_data/util/tmpfiles.d/weewx.conf /usr/share/weewx/weewx_data/util/syslog.d/weewx.conf /usr/share/weewx/weewx_data/util/apache/weewx.conf /usr/share/weewx/weewx_data/util/logwatch/conf/services/weewx.conf /usr/share/weewx/weewx_data/util/logwatch/conf/logfiles/weewx.conf /usr/share/weewx/weewx_data/util/init.d/weewx.bsd /usr/share/weewx/weewx_data/util/udev/rules.d/weewx.rules /usr/share/weewx/weewx_data/util/launchd/com.weewx.weewxd.plist /usr/share/weewx/weewx_data/util/rsyslog.d/weewx.conf /usr/share/weewx/weewx_data/weewx.conf /usr/share/weewx/weewx_data/skins/Standard/weewx.css ---------------------------------------------------------------- Next step: I took a new ssd and installed latest os (bookworm lite) and installed weewx the same way and it works! The only different is, that no apache server is running resp. a hompepage under /var/www/html ps aux|grep weewxd gave the same output as mentioned above ----------------------------------------------------------------- Next step: I have added a weewx.conf in apache 2/sites-enabled to allow to write to /var/www/html/weewx, but no success. Now I am out of Ideas Walter matthew wall schrieb am Montag, 12. Februar 2024 um 18:01:36 UTC+1: > walter, > > thank you for being patient. > > On Monday, February 12, 2024 at 11:22:13 AM UTC-5 wagr...@gmail.com wrote: > > I made again a new installation in the meantime, version 5. with the same > permission problem. > Now I realise that "weewx" is NOT running the process `weewxd`. It runs > under my own user. > > > how did this happen? if you installed weewx v4 using deb/rpm, it would > have run as root. at some point, you must have modified the configuration > so that weewxd runs as you instead of root. or perhaps you are running > weewxd directly, in which case it is running as you now, but runs as a > different user when the system boots. or perhaps at some point you changed > the ownership of /var/lib/weewx so it is owned by you? > > please post the contents of these files: > > /etc/default/weewx > /etc/systemd/system/weewx.service > /etc/init.d/weewx > > this may seem like pointless questions, but if we understand what is > different about your configuration, we can make the process smoother for > everyone. > > How can I set required permissions to my user or how can weewx take over > the the weewxd process? > Sorry to ask but my Linuxknowledge is limited :-| > > > *if* weewxd is running as you, and you want that to continue, then you > must change ownership of the files to your username, not 'weewx'. > > however, if you want weewxd to run as the 'weewx' user, then you must: > 1) ensure that the weewx user exists (from your previous posting, weewx > user appears to exist) > 2) change ownership of the files to weewx (from your previous posting, the > owner ship was weewx:weewx, at least when you posted) > 3) ensure that the systemd unit uses User=weewx and Group=weewx (look in > /usr/lib/systemd/system/weewx.service) > 4) ensure that you do not have other configuration that would override the > default (you should not need /etc/systemd/system/weewx.service) > 5) do not invoke weewxd directly as yourself, only as the weewx user > > m > > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1fbb809b-e3b6-439e-855c-6e786b817472n%40googlegroups.com.