Fhem config file (fhem.cfg) write protected

After the last major update of FHEM, the FHEM configurtion file (fhem.cfg) is write protected and cannot be changed. This protection was set in order to protect system settings and files to be changed by new users.

If you click in the FHEM user interface onto Edit files and then fhem.cfg as you are used to you will see the content of the file but cannot edit it. The notification “You can enable saving this file by setting the editConfig attribute, but read the documentation first for the side effects.” advises you to read the documentation before making any changes.

You can enable saving this file by setting the editConfig attribute, but read the documentation first for the side effects.

 

If you are confident with the FHEM configuration file and know what you are doing you can cancel the write protection by setting the arribute editConfig to the value of 1.

The easiest way to set the editConfig attribute to 1 is by typing the command

attr WEB editConfig 1

in the command text field in the upper region of the user interface and hitting ENTER.

attr WEB editConfig 1

 

After that you just need to save the config file. Therefore, click onto
Save config on the left side.

Save config ?

 

Hint: Before making any changes to the  fhem.cfg file make sure you make a backup copy of that file. In case anything goes wrong and you somehow destroy the configuration file you are able to revert to the initial state.

 

Below you can find the initial, unedidted content of the fhem.cfg file of FHEM 5.7

attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global motd SecurityCheck:\
\
WEB,WEBphone,WEBtablet has no basicAuth attribute.\
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.\

attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global verbose 3

define telnetPort telnet 7072 global

define WEB FHEMWEB 8083 global
attr WEB editConfig 1

define WEBphone FHEMWEB 8084 global
attr WEBphone stylesheetPrefix smallscreen

define WEBtablet FHEMWEB 8085 global
attr WEBtablet stylesheetPrefix touchpad

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog

define autocreate autocreate
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create

Leave your vote

7 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.