openhabian: Fix Permissions (option 14) keeps failing on fresh install of Debian.

Issue information:

Fix Permissions (option 14) keeps failing on fresh install of Debian. I’ve tried both the interactive and unattended installation options, and it fails with both. The main error seems to be as follows: “FAILED (openhab server mounts)”

Debug information:

Full Debug log:

[?1049l+ choice2='14 | Fix Permissions'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2021-01-02_17:57:14_SAST [openHABian] Updating Linux package information... '
2021-01-02_17:57:14_SAST [openHABian] Updating Linux package information... + [[ -z 2158 ]]
+ tail --pid=2158 -f /dev/null
+ echo OK
OK
+ case "$choice2" in
+ permissions_corrections
+ local gpioDir=/sys/devices/platform/soc
+ groups=("audio" "bluetooth" "dialout" "gpio" "tty")
+ local groups
+ openhabFolders=("/etc/openhab2" "/var/lib/openhab2" "/var/log/openhab2" "/usr/share/openhab2")
+ local openhabFolders
+ local openhabHome=/var/lib/openhab2
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2021-01-02_17:57:14_SAST [openHABian] Applying file permissions recommendations... '
2021-01-02_17:57:14_SAST [openHABian] Applying file permissions recommendations... + openhab_is_installed
+ openhab2_is_installed
++ cut '-d ' -f2
++ grep Status
++ dpkg -s openhab2
+ [[ '' == \i\n\s\t\a\l\l ]]
+ return 1
+ openhab3_is_installed
++ cut '-d ' -f2
++ grep Status
++ dpkg -s openhab
+ [[ install == \i\n\s\t\a\l\l ]]
+ return 0
+ return 0
+ for pGroup in "${groups[@]}"
+ grep -qs '^[[:space:]]*audio:' /etc/group
+ cond_redirect usermod --append --groups audio openhab
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups audio openhab \033[39;49;00m'

$ usermod --append --groups audio openhab 
+ usermod --append --groups audio openhab
+ return 0
+ cond_redirect usermod --append --groups audio openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups audio openhabian \033[39;49;00m'

$ usermod --append --groups audio openhabian 
+ usermod --append --groups audio openhabian
+ return 0
+ for pGroup in "${groups[@]}"
+ grep -qs '^[[:space:]]*bluetooth:' /etc/group
+ for pGroup in "${groups[@]}"
+ grep -qs '^[[:space:]]*dialout:' /etc/group
+ cond_redirect usermod --append --groups dialout openhab
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups dialout openhab \033[39;49;00m'

$ usermod --append --groups dialout openhab 
+ usermod --append --groups dialout openhab
+ return 0
+ cond_redirect usermod --append --groups dialout openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups dialout openhabian \033[39;49;00m'

$ usermod --append --groups dialout openhabian 
+ usermod --append --groups dialout openhabian
+ return 0
+ for pGroup in "${groups[@]}"
+ grep -qs '^[[:space:]]*gpio:' /etc/group
+ for pGroup in "${groups[@]}"
+ grep -qs '^[[:space:]]*tty:' /etc/group
+ cond_redirect usermod --append --groups tty openhab
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups tty openhab \033[39;49;00m'

$ usermod --append --groups tty openhab 
+ usermod --append --groups tty openhab
+ return 0
+ cond_redirect usermod --append --groups tty openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups tty openhabian \033[39;49;00m'

$ usermod --append --groups tty openhabian 
+ usermod --append --groups tty openhabian
+ return 0
+ cond_redirect usermod --append --groups openhab openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups openhab openhabian \033[39;49;00m'

$ usermod --append --groups openhab openhabian 
+ usermod --append --groups openhab openhabian
+ return 0
+ cond_redirect chown openhab:openhab /srv /srv/README.txt /opt
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown openhab:openhab /srv /srv/README.txt /opt \033[39;49;00m'

$ chown openhab:openhab /srv /srv/README.txt /opt 
+ chown openhab:openhab /srv /srv/README.txt /opt
chown: cannot access '/srv/README.txt': No such file or directory
+ return 1
+ echo 'FAILED (openhab server mounts)'
FAILED (openhab server mounts)
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "10 | Apply Improvements"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/master/docs/openhabian-DEBUG.md how to proceed.' 14 80

System information:

OS: Debian HW: Hyper-v VM

cat /etc/os-release output: PRETTY_NAME=“Debian GNU/Linux 10 (buster)” NAME=“Debian GNU/Linux” VERSION_ID=“10” VERSION=“10 (buster)” VERSION_CODENAME=buster ID=debian HOME_URL=“https://www.debian.org/” SUPPORT_URL=“https://www.debian.org/support” BUG_REPORT_URL=“https://bugs.debian.org/

uname -m output: i686

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

It fails because it’s still the old code.

Note the “s” it is clonebranch=FixPerms When it asks you on startup to upgrade and select a branch, push Cancel. or select the fixPerms branch in menu 01 before proceeding with menu 14