Autor Thema: Cannot update FHEM: No such file or directory, aborting the update  (Gelesen 1518 mal)

Offline okebaja

  • New Member
  • *
  • Beiträge: 16
Probably and hopefully a simple question, but I cannot find the answer nor solve it myself: my update process fails since it cannot find a file or folder. Please see this excerpt from my logs:

2022.01.17 19:08:13 1 : UPD ./CHANGED
2022.01.17 19:08:13 1 : copy ././CHANGED ./restoreDir/update/2022-01-17/./CHANGED failed:No such file or directory, aborting the update

I am using FHEM for many years and this was never a problem. Last weekend I had to restore a backup of FHEM and update is not working since, and failing on this error. What am I doing wrong?
Viele Grüße aus Rotterdam, NL
Eltako Funk 14-series EnOcean home automation managed by FHEM @ DietPi @ RaspberryPi 3B+

Offline Otto123

  • Tester
  • Hero Member
  • ****
  • Beiträge: 20848
  • schon mal restore trainiert?
    • Otto's Technik Blog
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #1 am: 17 Januar 2022, 20:02:40 »
could you please post the complete answer of this command in the FHEM commandline:
list global modpath
Viele Grüße aus Leipzig
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Offline okebaja

  • New Member
  • *
  • Beiträge: 16
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #2 am: 17 Januar 2022, 20:16:34 »
Hi Otto123, that is:

global            .

Is that what it's supposed to be?
Viele Grüße aus Rotterdam, NL
Eltako Funk 14-series EnOcean home automation managed by FHEM @ DietPi @ RaspberryPi 3B+

Offline Otto123

  • Tester
  • Hero Member
  • ****
  • Beiträge: 20848
  • schon mal restore trainiert?
    • Otto's Technik Blog
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #3 am: 17 Januar 2022, 20:22:30 »
yes that's ok.
I think this line ... copy ././CHANGED ... is from update modul. It want normally copy the file CHANGED from directory . (which is fhem Homedir)
The path is read from global motdpath.
It looks like the motdpath or the filename is strange.
What gives you:
{qx(find . -name *CHANGED)}}
Viele Grüße aus Leipzig
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Offline okebaja

  • New Member
  • *
  • Beiträge: 16
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #4 am: 17 Januar 2022, 20:25:12 »
That gives:
./restoreDir/update/2022-01-17/CHANGED
./restoreDir/update/2022-01-15/CHANGED
./www/frontend/CHANGED
./CHANGED
./contrib/HMCCU/CHANGED
./contrib/YAF/CHANGED
./contrib/voip2fhem/CHANGED

I am quite sure it has something to do with permissions. The OS user has 777 permissions on CHANGED and on ./restoreDir. During the process CHANGED is copied to the restoreDir/update/2022-01-17 directory, however, it is not authorised to read it.

File permissions of CHANGED:
364K -rw-r--r-- 1 fhem   364K Jan 17 20:19 CHANGED

Is the user correct? The rest of the installation has my OS user as user:
dietpi@BrightPi:/opt$ ls -lsa
total 16K
4.0K drwxr-xr-x  4 root   4.0K Jan 16 12:53 ./
4.0K drwxr-xr-x 21 root   4.0K Jul 10  2020 ../
4.0K drwxr-xr-x 13 dietpi 4.0K Jan 17 20:02 fhem/
Viele Grüße aus Rotterdam, NL
Eltako Funk 14-series EnOcean home automation managed by FHEM @ DietPi @ RaspberryPi 3B+

Offline Otto123

  • Tester
  • Hero Member
  • ****
  • Beiträge: 20848
  • schon mal restore trainiert?
    • Otto's Technik Blog
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #5 am: 17 Januar 2022, 21:13:59 »
which user is running FHEM?
for FHEM commandline:
{qx(whoami)}
for normally the right rights commandline system:
sudo chown -R fhem: /opt/fhem
« Letzte Änderung: 17 Januar 2022, 21:21:59 von Otto123 »
Viele Grüße aus Leipzig
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Offline okebaja

  • New Member
  • *
  • Beiträge: 16
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #6 am: 17 Januar 2022, 21:53:39 »
Vielen Dank! That did the trick! User running was 'fhem', user on the file system was 'dietpi'.
Viele Grüße aus Rotterdam, NL
Eltako Funk 14-series EnOcean home automation managed by FHEM @ DietPi @ RaspberryPi 3B+
Gefällt mir Gefällt mir x 1 Liste anzeigen

Offline yersinia

  • Hero Member
  • *****
  • Beiträge: 1332
    • Cyanide & Happiness
Antw:Cannot update FHEM: No such file or directory, aborting the update
« Antwort #7 am: 18 Januar 2022, 09:30:37 »
@okebaja:
For couriosity, any reason why you run fhem on dietpi and not on RaspiOS lite? (Assuming that you run it on a raspberry)
I used dietpi first when i installed pihole, but every second dietpi update screwed up the pihole install. Since I moved to RaspiOs lite I never had such issues anymore - it also survived the upgrade path stretch->buster->bullseye.
I see the stats but is it worth? Would be glad when you share your experience. :)

Edit: the pihole is still on buster
« Letzte Änderung: 21 Januar 2022, 11:16:01 von yersinia »
viele Grüße, yersinia
----
FHEM 6.1 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl