fhem / fhem/fhem-docker

Alleged permission issue regarding logfile (readonly)

Đang mở
#283 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
90
Fork
26
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
9

Mô tả

**Describe the bug**
Starting a container with image tag `4-bullseye` and env variables `FHEM_UID` and `FHEM_GID` set to a non-default value, FHEM gives the following error message:
`Messages collected while initializing FHEM:configfile: logfile is readonly, it is set in the FHEM_GLOBALATTR environment `

However, the logfile is writeable without any problems. Also, all permissions get set correctly (i.e. `entry.sh` is doing its job correctly).

**To Reproduce**
Steps to reproduce the behavior:
1. Set `FHEM_UID` and `FHEM_GID` to some non-default value
2. Start container
3. Observe reading `init_errors` in device `global`
4. Observe logfile and notice it is being written to despite the error message
5. Change to 3-bullseye and observe that error message vanishes

**Expected behavior**
No error message

**Additional context**
Another user reported that they also get an error message for the PID file. This first occurred after switching from `3-bullseye` to `4-bullseye`.
See [here](https://forum.fhem.de/index.php?topic=89745.msg1327239#msg1327239) (also see following forum posts for additional context).

Also, I am not sure if this is an issue within fhem.pl or with the container environment, however, given that the issue was not present in `3-bullseye` I am assuming it is an issue with the code in this repo, rather than FHEM itself.

For the sake of completeness, here is the content of `/proc/$PID/environ`:
`SHELL=/bin/bashFHEM_GLOBALATTR=nofork=0 updateInBackground=1 logfile=log/fhem-%Y-%m-%d.log pidfilename=log/fhem.pidHOSTNAME=ha_fhemtestLANGUAGE=en_US:enPERL_JSON_BACKEND=Cpanel::JSON::XS,JSON::XS,JSON::PP,JSON::backportPPLC_ADDRESS=de_DE.UTF-8LC_NAME=de_DE.UTF-8LC_MONETARY=de_DE.UTF-8UMASK=0037PWD=/opt/fhemLOGNAME=fhemTZ=Europe/BerlinLOGFILE=/opt/fhem/log/fhem-%Y-%m-%d.logHOME=/opt/fhemFHEM_UID=7073LANG=en_US.UTF-8LC_PAPER=de_DE.UTF-8PERL5LIB=/usr/src/app/core/lib/perl5:/usr/src/app/3rdparty/lib/perl5GPIO_GID=6002FHEM_GID=7067TERM=xtermUSER=fhemCONFIGTYPE=fhem.cfgDOCKER_GW=172.21.0.1I2C_GID=6003TIMEOUT=10SHLVL=1LC_TELEPHONE=de_DE.UTF-8LC_MESSAGES=en_DK.UTF-8LC_MEASUREMENT=de_DE.UTF-8FHEM_PERM_FILE=0640LC_TIME=de_DE.UTF-8DOCKER_HOST=172.21.0.1PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binTELNETPORT=7072DOCKER_HOSTNETWORK=0MAIL=/var/mail/fhemFHEM_PERM_DIR=0750BLUETOOTH_GID=6001LC_NUMERIC=de_DE.UTF-8DOCKER_PRIVILEGED=1OLDPWD=/opt/fhem_=/usr/local/bin/perlroot`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.