FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: moonsorrox am 01 Dezember 2013, 13:14:50

Titel: Ich bekomme ein Permission denied
Beitrag von: moonsorrox am 01 Dezember 2013, 13:14:50
ich wollte heute mal wieder etwas in einer Datei ändern (in der RaspPi.cfg) und bekomme beim abspeichern immer folgende Meldung
Zitat./FHEM/RaspPi.cfg: Permission denied

dann habe ich mal eine andere Datei genommen und da das gleiche Problem, nun habe ich hier im Forum schon einiges darüber gefunden so z.B. das ich die Zugriffsrechte meiner fhem-Installation überprüfen soll..! Wenn ich mir jetzt mal meine Dateiberechtigungen anschaue sind die alle gleich sie haben 644 die fhem.cfg hat 666
Da dies bisher immer so war frage ich jetzt was kann ich tun und was ist passiert ich habe ja nichts geändert.

Jetzt habe ich einen Neustart gemacht und bekomme immer diese Meldung:
ZitatSecurityCheck:

telnetPort has no password/globalpassword attribute.

Restart fhem for a new check if the problem is fixed,
or set the global attribute motd to none to supress this message.

bin jetzt etwas ratlos

Mein Log von heute morgen:
2013.12.01 07:31:06 1: HMLAN_Parse: HMLanHaus new condition timeout
2013.12.01 07:31:06 1: 10.0.0.51:1000 disconnected, waiting to reappear
2013.12.01 07:31:06 1: HMLAN_Parse: HMLanHaus new condition disconnected
2013.12.01 07:31:11 1: 10.0.0.51:1000 reappeared (HMLanHaus)
2013.12.01 07:31:11 1: HMLAN_Parse: HMLanHaus new condition init
2013.12.01 07:31:11 1: HMLAN_Parse: HMLanHaus new condition ok
2013.12.01 07:55:00 2: CUL_HM set RollladenWZ on
2013.12.01 07:57:01 2: CUL_HM set RollladenWZ statusRequest
Use of uninitialized value $dataThroughput in string ne at ./FHEM/99_RpiUtils.pm line 338.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 1059.
2013.12.01 12:40:30 0: Strange call for typeless FileLog_iPhone: UndefFn
2013.12.01 12:40:30 1: Including fhem.cfg
Subroutine RPiUtils_Initialize redefined at ./FHEM/99_RpiUtils.pm line 67, <$fh> line 5.
Subroutine RPiLoad redefined at ./FHEM/99_RpiUtils.pm line 85, <$fh> line 5.
Subroutine RPiRamSwap redefined at ./FHEM/99_RpiUtils.pm line 108, <$fh> line 5.
Subroutine RPiTemp redefined at ./FHEM/99_RpiUtils.pm line 182, <$fh> line 5.
Subroutine RPiCPUSpeed redefined at ./FHEM/99_RpiUtils.pm line 203, <$fh> line 5.
Subroutine RPiUpTime redefined at ./FHEM/99_RpiUtils.pm line 224, <$fh> line 5.
Subroutine RPiFileSystem redefined at ./FHEM/99_RpiUtils.pm line 273, <$fh> line 5.
Subroutine RPiNetwork redefined at ./FHEM/99_RpiUtils.pm line 305, <$fh> line 5.
Subroutine ShowRPiValues redefined at ./FHEM/99_RpiUtils.pm line 380, <$fh> line 5.
2013.12.01 12:40:30 3: telnetPort: port 7072 opened
2013.12.01 12:40:30 3: WEB: port 8083 opened
2013.12.01 12:40:30 3: WEBphone: port 8084 opened
2013.12.01 12:40:30 3: WEBtablet: port 8085 opened
2013.12.01 12:40:30 1: Including ./FHEM/LanInterface.cfg
2013.12.01 12:40:30 1: HMLAN_Parse: HMLanHaus new condition disconnected
2013.12.01 12:40:30 3: Opening HMLanHaus device 10.0.0.51:1000
2013.12.01 12:40:30 3: HMLanHaus device opened
2013.12.01 12:40:30 1: HMLAN_Parse: HMLanHaus new condition init
2013.12.01 12:40:30 1: Including ./FHEM/RollladenWZ.cfg
2013.12.01 12:40:31 1: Including ./FHEM/BeleuchtungEingang.cfg
2013.12.01 12:40:31 1: Including ./FHEM/Wetter.cfg
2013.12.01 12:40:31 1: Including ./FHEM/Mobotix.cfg
2013.12.01 12:40:31 1: Including ./FHEM/RaspPi.cfg
2013.12.01 12:40:31 1: Including ./FHEM/Temperaturen.cfg
2013.12.01 12:40:31 1: Including ./FHEM/TabletPhone.cfg
Subroutine webViewControl_Initialize redefined at ./FHEM/95_WebViewControl.pm line 57, <> line 17.
Subroutine webViewControl_Define redefined at ./FHEM/95_WebViewControl.pm line 79, <> line 17.
Subroutine webViewControl_Undef redefined at ./FHEM/95_WebViewControl.pm line 94, <> line 17.
Subroutine webViewControl_modifyJsInclude redefined at ./FHEM/95_WebViewControl.pm line 103, <> line 17.
Subroutine webViewControl_Set redefined at ./FHEM/95_WebViewControl.pm line 118, <> line 17.
Subroutine webViewControl_Set2 redefined at ./FHEM/95_WebViewControl.pm line 175, <> line 17.
Subroutine webViewControl_Get redefined at ./FHEM/95_WebViewControl.pm line 211, <> line 17.
Subroutine webViewControl_Cgi redefined at ./FHEM/95_WebViewControl.pm line 232, <> line 17.
2013.12.01 12:40:31 1: Including ./log/fhem.save
2013.12.01 12:40:32 1: HMLAN_Parse: HMLanHaus new condition ok
2013.12.01 12:40:36 3: Device Aussensensor_Norden added to ActionDetector with 000:10 time
2013.12.01 12:40:37 2: CUL_HM set AussenLampe statusRequest
2013.12.01 12:40:38 1: Including fhem.cfg
Subroutine RPiUtils_Initialize redefined at ./FHEM/99_RpiUtils.pm line 67, <$fh> line 5.
Subroutine RPiLoad redefined at ./FHEM/99_RpiUtils.pm line 85, <$fh> line 5.
Subroutine RPiRamSwap redefined at ./FHEM/99_RpiUtils.pm line 108, <$fh> line 5.
Subroutine RPiTemp redefined at ./FHEM/99_RpiUtils.pm line 182, <$fh> line 5.
Subroutine RPiCPUSpeed redefined at ./FHEM/99_RpiUtils.pm line 203, <$fh> line 5.
Subroutine RPiUpTime redefined at ./FHEM/99_RpiUtils.pm line 224, <$fh> line 5.
Subroutine RPiFileSystem redefined at ./FHEM/99_RpiUtils.pm line 273, <$fh> line 5.
Subroutine RPiNetwork redefined at ./FHEM/99_RpiUtils.pm line 305, <$fh> line 5.
Subroutine ShowRPiValues redefined at ./FHEM/99_RpiUtils.pm line 380, <$fh> line 5.
2013.12.01 12:40:38 3: telnetPort: port 7072 opened
2013.12.01 12:40:38 3: WEB: port 8083 opened
2013.12.01 12:40:38 3: WEBphone: port 8084 opened
2013.12.01 12:40:38 3: WEBtablet: port 8085 opened
2013.12.01 12:40:38 1: Including ./FHEM/LanInterface.cfg
2013.12.01 12:40:38 1: HMLAN_Parse: HMLanHaus new condition disconnected
2013.12.01 12:40:38 3: Opening HMLanHaus device 10.0.0.51:1000
2013.12.01 12:40:38 3: HMLanHaus device opened
2013.12.01 12:40:38 1: HMLAN_Parse: HMLanHaus new condition init
2013.12.01 12:40:38 1: Including ./FHEM/RollladenWZ.cfg
2013.12.01 12:40:38 1: Including ./FHEM/BeleuchtungEingang.cfg
2013.12.01 12:40:38 1: Including ./FHEM/Wetter.cfg
2013.12.01 12:40:39 1: Including ./FHEM/Mobotix.cfg
2013.12.01 12:40:39 1: Including ./FHEM/RaspPi.cfg
2013.12.01 12:40:39 1: Including ./FHEM/Temperaturen.cfg
2013.12.01 12:40:39 1: Including ./FHEM/TabletPhone.cfg
Subroutine webViewControl_Initialize redefined at ./FHEM/95_WebViewControl.pm line 57, <> line 17.
Subroutine webViewControl_Define redefined at ./FHEM/95_WebViewControl.pm line 79, <> line 17.
Subroutine webViewControl_Undef redefined at ./FHEM/95_WebViewControl.pm line 94, <> line 17.
Subroutine webViewControl_modifyJsInclude redefined at ./FHEM/95_WebViewControl.pm line 103, <> line 17.
Subroutine webViewControl_Set redefined at ./FHEM/95_WebViewControl.pm line 118, <> line 17.
Subroutine webViewControl_Set2 redefined at ./FHEM/95_WebViewControl.pm line 175, <> line 17.
Subroutine webViewControl_Get redefined at ./FHEM/95_WebViewControl.pm line 211, <> line 17.
Subroutine webViewControl_Cgi redefined at ./FHEM/95_WebViewControl.pm line 232, <> line 17.
2013.12.01 12:40:39 1: Including ./log/fhem.save
Use of uninitialized value $chns[0] in string ne at ./FHEM/10_CUL_HM.pm line 5048.
Use of uninitialized value in concatenation (.) or string at ./FHEM/10_CUL_HM.pm line 5048.
2013.12.01 12:40:40 2: CUL_HM set RollladenWZ statusRequest
2013.12.01 12:40:40 1: HMLAN_Parse: HMLanHaus new condition ok
Use of uninitialized value $dataThroughput in string ne at ./FHEM/99_RpiUtils.pm line 338.
2013.12.01 12:40:44 3: Device Aussensensor_Norden added to ActionDetector with 000:10 time
2013.12.01 12:40:45 2: CUL_HM set AussenLampe statusRequest
2013.12.01 12:40:46 2: CUL_HM set RollladenWZ statusRequest
2013.12.01 12:42:33 2: CUL_HM set Aussensensor_Norden getConfig
2013.12.01 12:44:31 0: Server shutdown
2013.12.01 12:44:34 1: Including fhem.cfg
2013.12.01 12:44:35 3: telnetPort: port 7072 opened
2013.12.01 12:44:36 3: WEB: port 8083 opened
2013.12.01 12:44:36 3: WEBphone: port 8084 opened
2013.12.01 12:44:36 3: WEBtablet: port 8085 opened
2013.12.01 12:44:36 1: Including ./FHEM/LanInterface.cfg
2013.12.01 12:44:36 1: HMLAN_Parse: HMLanHaus new condition disconnected
2013.12.01 12:44:36 3: Opening HMLanHaus device 10.0.0.51:1000
2013.12.01 12:44:36 3: HMLanHaus device opened
2013.12.01 12:44:36 1: HMLAN_Parse: HMLanHaus new condition init
2013.12.01 12:44:36 1: Including ./FHEM/RollladenWZ.cfg
2013.12.01 12:44:38 1: Including ./FHEM/BeleuchtungEingang.cfg
2013.12.01 12:44:38 1: Including ./FHEM/Wetter.cfg
2013.12.01 12:44:39 1: Including ./FHEM/Mobotix.cfg
2013.12.01 12:44:39 1: Including ./FHEM/RaspPi.cfg
2013.12.01 12:44:39 1: Including ./FHEM/Temperaturen.cfg
2013.12.01 12:44:39 1: Including ./FHEM/TabletPhone.cfg
2013.12.01 12:44:39 1: configfile: powerLevel not yet set
powerPlugged not yet set
2013.12.01 12:44:39 1: Including ./log/fhem.save
2013.12.01 12:44:40 1: usb create starting
2013.12.01 12:44:41 3: Opening CUL device /dev/ttyAMA0
2013.12.01 12:44:41 3: Setting CUL baudrate to 38400
2013.12.01 12:44:41 3: CUL device opened
2013.12.01 12:44:42 3: Opening TCM310 device /dev/ttyAMA0
2013.12.01 12:44:42 3: Setting TCM310 baudrate to 57600
2013.12.01 12:44:42 3: TCM310 device opened
2013.12.01 12:44:42 3: Opening FRM device /dev/ttyAMA0
2013.12.01 12:44:42 3: Setting FRM baudrate to 57600
2013.12.01 12:44:42 3: FRM device opened
2013.12.01 12:44:47 1: usb create end
2013.12.01 12:44:47 2: SecurityCheck:  telnetPort has no password/globalpassword attribute.  Restart fhem for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2013.12.01 12:44:47 0: Server started with 35 defined entities (version $Id: fhem.pl 4286 2013-11-25 08:50:12Z rudolfkoenig $, os linux, user fhem, pid 6407)
2013.12.01 12:44:47 3: Device Aussensensor_Norden added to ActionDetector with 000:10 time
2013.12.01 12:44:47 1: HMLAN_Parse: HMLanHaus new condition ok
2013.12.01 12:44:49 2: CUL_HM set AussenLampe statusRequest
2013.12.01 12:44:50 2: CUL_HM set RollladenWZ statusRequest
Use of uninitialized value $dataThroughput in string ne at ./FHEM/99_RpiUtils.pm line 338.
2013.12.01 12:45:03 2: CUL_HM set Aussensensor_Norden getConfig
Use of uninitialized value $dataThroughput in string ne at ./FHEM/99_RpiUtils.pm line 338.
2013.12.01 12:52:45 0: Server shutdown
2013.12.01 12:52:49 1: Including fhem.cfg
2013.12.01 12:52:50 3: telnetPort: port 7072 opened
2013.12.01 12:52:50 3: WEB: port 8083 opened
2013.12.01 12:52:50 3: WEBphone: port 8084 opened
2013.12.01 12:52:50 3: WEBtablet: port 8085 opened
2013.12.01 12:52:51 1: Including ./FHEM/LanInterface.cfg
2013.12.01 12:52:51 1: HMLAN_Parse: HMLanHaus new condition disconnected
2013.12.01 12:52:51 3: Opening HMLanHaus device 10.0.0.51:1000
2013.12.01 12:52:51 3: HMLanHaus device opened
2013.12.01 12:52:51 1: HMLAN_Parse: HMLanHaus new condition init
2013.12.01 12:52:51 1: Including ./FHEM/RollladenWZ.cfg
2013.12.01 12:52:53 1: Including ./FHEM/BeleuchtungEingang.cfg
2013.12.01 12:52:53 1: Including ./FHEM/Wetter.cfg
2013.12.01 12:52:53 1: Including ./FHEM/Mobotix.cfg
2013.12.01 12:52:53 1: Including ./FHEM/RaspPi.cfg
2013.12.01 12:52:54 1: Including ./FHEM/Temperaturen.cfg
2013.12.01 12:52:54 1: Including ./FHEM/TabletPhone.cfg
2013.12.01 12:52:54 1: configfile: powerLevel not yet set
powerPlugged not yet set
2013.12.01 12:52:54 1: Including ./log/fhem.save
2013.12.01 12:52:54 1: usb create starting
2013.12.01 12:52:56 3: Opening CUL device /dev/ttyAMA0
2013.12.01 12:52:56 3: Setting CUL baudrate to 38400
2013.12.01 12:52:56 3: CUL device opened
2013.12.01 12:52:56 3: Opening TCM310 device /dev/ttyAMA0
2013.12.01 12:52:56 3: Setting TCM310 baudrate to 57600
2013.12.01 12:52:56 3: TCM310 device opened
2013.12.01 12:52:56 3: Opening FRM device /dev/ttyAMA0
2013.12.01 12:52:56 3: Setting FRM baudrate to 57600
2013.12.01 12:52:56 3: FRM device opened
2013.12.01 12:53:02 1: usb create end
2013.12.01 12:53:02 2: SecurityCheck:  telnetPort has no password/globalpassword attribute.  Restart fhem for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2013.12.01 12:53:02 0: Server started with 35 defined entities (version $Id: fhem.pl 4286 2013-11-25 08:50:12Z rudolfkoenig $, os linux, user fhem, pid 6447)
2013.12.01 12:53:02 3: Device Aussensensor_Norden added to ActionDetector with 000:10 time
2013.12.01 12:53:02 1: HMLAN_Parse: HMLanHaus new condition ok
2013.12.01 12:53:03 2: CUL_HM set AussenLampe statusRequest
2013.12.01 12:53:04 2: CUL_HM set RollladenWZ statusRequest
2013.12.01 12:54:47 2: CUL_HM set Aussensensor_Norden getConfig
2013.12.01 13:09:48 0: Server shutdown
2013.12.01 13:09:51 1: Including fhem.cfg
2013.12.01 13:09:52 3: telnetPort: port 7072 opened
2013.12.01 13:09:52 3: WEB: port 8083 opened
2013.12.01 13:09:52 3: WEBphone: port 8084 opened
2013.12.01 13:09:52 3: WEBtablet: port 8085 opened
2013.12.01 13:09:53 1: Including ./FHEM/LanInterface.cfg
2013.12.01 13:09:53 1: HMLAN_Parse: HMLanHaus new condition disconnected
2013.12.01 13:09:53 3: Opening HMLanHaus device 10.0.0.51:1000
2013.12.01 13:09:53 3: HMLanHaus device opened
2013.12.01 13:09:53 1: HMLAN_Parse: HMLanHaus new condition init
2013.12.01 13:09:53 1: Including ./FHEM/RollladenWZ.cfg
2013.12.01 13:09:55 1: Including ./FHEM/BeleuchtungEingang.cfg
2013.12.01 13:09:55 1: Including ./FHEM/Wetter.cfg
2013.12.01 13:09:56 1: Including ./FHEM/Mobotix.cfg
2013.12.01 13:09:56 1: Including ./FHEM/RaspPi.cfg
2013.12.01 13:09:56 1: Including ./FHEM/Temperaturen.cfg
2013.12.01 13:09:56 1: Including ./FHEM/TabletPhone.cfg
2013.12.01 13:09:56 1: configfile: powerLevel not yet set
powerPlugged not yet set
2013.12.01 13:09:56 1: Including ./log/fhem.save
2013.12.01 13:09:57 1: usb create starting
2013.12.01 13:09:58 3: Opening CUL device /dev/ttyAMA0
2013.12.01 13:09:58 3: Setting CUL baudrate to 38400
2013.12.01 13:09:58 3: CUL device opened
2013.12.01 13:09:59 3: Opening TCM310 device /dev/ttyAMA0
2013.12.01 13:09:59 3: Setting TCM310 baudrate to 57600
2013.12.01 13:09:59 3: TCM310 device opened
2013.12.01 13:09:59 3: Opening FRM device /dev/ttyAMA0
2013.12.01 13:09:59 3: Setting FRM baudrate to 57600
2013.12.01 13:09:59 3: FRM device opened
2013.12.01 13:10:04 1: usb create end
2013.12.01 13:10:04 2: SecurityCheck:  telnetPort has no password/globalpassword attribute.  Restart fhem for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2013.12.01 13:10:04 0: Server started with 35 defined entities (version $Id: fhem.pl 4286 2013-11-25 08:50:12Z rudolfkoenig $, os linux, user fhem, pid 6456)
2013.12.01 13:10:04 3: Device Aussensensor_Norden added to ActionDetector with 000:10 time
2013.12.01 13:10:04 1: HMLAN_Parse: HMLanHaus new condition ok
2013.12.01 13:10:06 2: CUL_HM set AussenLampe statusRequest
2013.12.01 13:10:07 2: CUL_HM set RollladenWZ statusRequest
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: moonsorrox am 01 Dezember 2013, 14:09:46
ich antworte mal selbst, da ich in der zwischen Zeit weiter gesucht habe und einen Beitrag im Forum gefunden habe der mir geholfen hat...

Ich habe ein:
sudo chmod -R a+w fhem
gemacht und nun geht es wieder  ;D

gefunden in diesem Beitrag hier, von unserem Moderator Puschel74:
http://forum.fhem.de/index.php/topic,11160.msg67892.html#msg67892 (http://forum.fhem.de/index.php/topic,11160.msg67892.html#msg67892)
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: hobu am 01 Dezember 2013, 14:54:55
Zitat von: moonsorrox am 01 Dezember 2013, 14:09:46
ich antworte mal selbst, da ich in der zwischen Zeit weiter gesucht habe und einen Beitrag im Forum gefunden habe der mir geholfen hat...

Ich habe ein:
sudo chmod -R a+w fhem
gemacht und nun geht es wieder  ;D

gefunden in diesem Beitrag hier, von unserem Moderator Puschel74:
http://forum.fhem.de/index.php/topic,11160.msg67892.html#msg67892 (http://forum.fhem.de/index.php/topic,11160.msg67892.html#msg67892)

Hm... Bei Zugriffsproblemen besser erstmal prüfen, ob die Datei noch dem richtigen User gehört (-> "fhem"). Falls ja, danach prüfen, ob die Zugriffsrechte noch passen.

Beispiel:
So sollte es normalerweise aussehen:
Zitatroot@pi:/opt/fhem# ls -l fhem.cfg
-rw-r--r-- 1 fhem root 3667 Dez  1 13:07 fhem.cfg
(Evtl. mit Gruppe "dialout" statt "root" - aber das ist hier jetzt nebensächlich)

Wenn nun die Datei nicht mehr "fhem" gehört, kann der Hauptprozess (-> WebFrontend) diese auch nicht mehr überschreiben und es kommt die beobachtete Fehlermeldung:
Zitatroot@pi:/opt/fhem# ls -l fhem.cfg
-rw-r--r-- 1 root root 3667 Dez  1 13:07 fhem.cfg

Mit Deinem Befehl hast Du nun die Zugriffsrechte auf die Datei (und alle anderen Dateien ebenfalls) so gesetzt:
Zitatroot@pi:/opt/fhem# ls -l fhem.cfg
-rw-rw-rw- 1 root root 3667 Dez  1 13:07 fhem.cfg
Damit kannst Du nun zwar die Datei über's Web-Frontend wieder beschreiben, aber jeder andere User oder Prozess ebenfalls - oder auch löschen, wenn's ganz dumm läuft.

Long story short:
Beim beobachteten Problem (o.ä,) erstmal prüfen, ob die Datei noch den richtigen Owner hat (notfalls im Backup nachgucken) und diesen ggf. korrigieren:
Zitat
root@pi:/opt/fhem# ls -l fhem.cfg
-rw-r--r-- 1 root root 3667 Dez  1 13:07 fhem.cfg
root@pi:/opt/fhem# chown fhem fhem.cfg
-rw-r--r-- 1 fhem root 3667 Dez  1 13:07 fhem.cfg

Falls es dann noch Probleme geben sollte, könnte es an der Gruppe (hier: root) oder falsch gesetzten Zugriffs-Bits liegen.
Von der Holzhammermethode 'chmod -R a+w ...' sollte man aber die Finger lassen: Damit machst Du jede Datei/Verzeichnis unterhalb von fhem/* beschreibbar. Nix gut...  :(
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: moonsorrox am 01 Dezember 2013, 15:04:10
OK sehr gut erklärt..! ;)

ich wußte mir nicht weiter zu helfen und habe eben dies gefunden... klar ist das gefährlich...
Aber jetzt mal die Frage "WARUM" ist das passiert... ich habe weder etwas geändert noch habe ich ein Backup gemacht...!

Jetzt noch die Frage was ich mit der Holzhammer Methode geändert habe kann ich doch wieder rückgängig machen, oder?
Wenn ja wie, ich hatte die Datei Rechte überprüft und fand nichts was irgendwie anders war denn ich bin der Meinung die haben normalerweise die Berechtigung wie ich sie oben geschrieben habe die meisten Dateien die 644 und die fhem.cfg 666

Ist das korrekt..?
Da werde ich das wohl alles ändern müssen..?
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: hobu am 01 Dezember 2013, 15:32:40
Zitat von: moonsorrox am 01 Dezember 2013, 15:04:10
Aber jetzt mal die Frage "WARUM" ist das passiert... ich habe weder etwas geändert noch habe ich ein Backup gemacht...!

Jetzt noch die Frage was ich mit der Holzhammer Methode geändert habe kann ich doch wieder rückgängig machen, oder?
Zum "Warum" hab' ich keine Idee.
Bzgl. Backup: Evtl. hast Du ja unwissentlich eins angelegt? ;)
Bei jedem Update über's Webfrontend wird normalerweise eins angelegt.
Schau' mal unter /opt/fhem/backup/ nach. Evtl. liegt da ja doch was?

Den alten Stand der Berechtigungen manuell wiederherstellen?
Backup einspielen wäre einfacher & sicherer...

Wenn Du's trotzdem versuchen willst, mein Vorschlag - aber ohne Gewähr und auf eigenes Risiko:
Voraussetzung ist, Du hast einen RaspPi mit Wheezy und FHEM per Debian-Paket installiert. Dann müsste FHEM in /opt fhem zu finden sein und und die (meisten) Dateien gehören fhem.
Wenn's bei Dir anders aussieht: Hier abbrechen.
Du bist mutig und willst weitermachen? - OK... Dann so:
cd /opt/fhem
chown -R fhem *
chmod -R go-w *

Danach gehören alle Dateien und Verzeichnisse fhem und sind auch nur noch für fhem beschreibbar.

Damit bekommst Du wohl nicht den Ursprungszustand wiederhergestellt, aber zumindest halbwegs wieder den alten Sicherheitsstand.
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: moonsorrox am 01 Dezember 2013, 16:58:33
Ok ich habe zwar noch kein Backup wieder hergestellt, aber das ist mir lieber. Werde mal suchen was es dazu so gibt..!
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: Puschel74 am 01 Dezember 2013, 17:55:51
Hallo,

Zitataber jeder andere User oder Prozess ebenfalls - oder auch löschen, wenn's ganz dumm läuft.
Das ist absolut richtig.

ZitatVon der Holzhammermethode 'chmod -R a+w ...' sollte man aber die Finger lassen: Damit machst Du jede Datei/Verzeichnis unterhalb von fhem/* beschreibbar.
Und das stimmt ebenso.

Da bei mir der RasPi aber in meinem internen Lan hängt und (zur Zeit) nur FHEM drauf läuft wollte! ich auch jede Datei und Verzeichniss unter /opt/fhem beschreibbar für jeden machen.
Klar hätte ich auch mit der passenden User-Gruppe arbeiten können.

Da ich die Dateien unter /opt/fhem aber von verschiedenen Rechnern aus unter verschiedenen Benutzernamen mit Putty oder WinSCP bearbeite bzw. kopiere gefiel mir persönlich die "Holzhammermethode" besser da ich recht einfach ein <permission denied> damit umgehen kann.

Logisch sollte man dann auch wissen was man macht  8)

Grüße
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: moonsorrox am 01 Dezember 2013, 18:08:15
ich habs mir grad komplett zerschossen...!  :'(
Egal ich hatte die Karte letzte Woche als Sicherheit fertig gemacht und hatte sie als letztes am 27.11 in der Mangel, seit diesem Tage ging alles nun eben heute oben genanntes Problem, mit den wiederherstellen per FTP ist jetzt irgend etwas schief gelaufen...!

Ich hatte zwei tgz. dateien im Backup Ordner in beiden hat die fhem.cfg "0" byte also nix das habe ich nicht gesehen nun ging irgend wie nichts mehr...
Nun habe ich wieder meine andere SD Karte drin und werde bei Zeiten die wieder komplett neu aufsetzen...

Kann leider kein überschreiben mit dem Diskimagewriter machen da eine 16GB und die andere 8GB hat und so ein Linux Frak bin ich nicht also mal eben Neu..

Gut soviel zu der Geschichte mit dem Restore, gibt es irgendwo eine echte gute Anleitung ich habe hier im Forum nix gefunden..?
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: Puschel74 am 01 Dezember 2013, 18:13:04
Hallo,

um FHEM auf einem RasPi zu installieren habe ich mal im Leitfaden einen Link eingetragen.

Zitathttp://forum.fhem.de/index.php/topic,16311.0.html

Einfach im (zur Zeit) noch letzten Beitrag schauen.

Ich habe auf meinen RasPi das Backup vor einem update deaktiviert da ich (mehr oder weniger) regelmäßig eine Kopie von /opt/fhem per WinSCP auf meinem NAS ablege.
Darüber war ich auch durchaus das eine oder andere Mal schon froh da ich die Dateien dann recht bequem eben wieder mit WinSCP auf den RasPi kopieren konnte.

Grüße

P.S.: Der Hinweis mit Backup abschalten sollte aber nur Ernst genommen bzw. übernommen werden wenn man weiß was man macht  8)
Titel: Antw:Ich bekomme ein Permission denied
Beitrag von: moonsorrox am 01 Dezember 2013, 23:28:49
jo sehr gut, denn nach dieser Anleitung habe ich bisher meine beiden Fhem Installationen gemacht, ist ganz easy und gut beschrieben....
werde morgen meine zerschossene Installation auch nochmal NEU machen... man lernt ja auch einiges dazu, slange man nicht unter Druck steht und es sofort braucht...
Ich habe seit neusten immer eine zweite fertige fhem SD Karte die ich sofort nutzen kann....!