I was running OH1.8 and wanted to try OH2, since it’s released as stable. However I’m having some permission problems on my setup.
My Hardware Setup:
I own a Banana pi pro and using it as NAS, running Openmediavault(OMV)3 (with Deluge, mysql, smb, nfs etc). OS is Armbian 5.25, based on Debian 8 Jessie. The system was OMV2, based on wheezy and OH1.8 was working flawlessly on attached SATA HDD.
I updated to OH2. Since I want to move everything away from SD, and bananapi let me boot from sd but have data on sata hdd, I installed it manually as defined in Installation Tutorial. However I got permission denied errors.
To be sure it’s working I fresh installed Raspbian Jessie on a spare Rpi2 and manually installed OH2 and it worked. Then I updated my NAS setup to Jessie based one and re-installed OH2. My permission errors still exist.
HDD is mounted as /srv/dev-disk-by-label-NASDrive and fstab is as:
/dev/mmcblk0p1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 #/var/swap none swap sw 0 0 tmpfs /tmp tmpfs defaults 0 0 # >>> [openmediavault] /dev/disk/by-label/NASDrive /srv/dev-disk-by-label-NASDrive ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2 # <<< [openmediavault]
Folder permissions are
root@OPENMEDIAVAULT:/srv/dev-disk-by-label-NASDrive/openhab2# ls -l /srv/dev-disk-by-label-NASDrive/ drwxrwsr-x+ 6 openhab openhab 4096 Apr 24 20:43 openhab2
When I do
sudo su -s /bin/bash -c '/srv/dev-disk-by-label-NASDrive/openhab2/start.sh' openhab
I get Permission denied error as:
root@OPENMEDIAVAULT:/srv/dev-disk-by-label-NASDrive/openhab2# sudo su -s /bin/bash -c '/srv/dev-disk-by-label-NASDrive/openhab2/start.sh' openhab bash: /srv/dev-disk-by-label-NASDrive/openhab2/start.sh: Permission denied
I copied openhab2 folder to /opt with same ownership:
root@OPENMEDIAVAULT:/srv/dev-disk-by-label-NASDrive/openhab2# ls -l /opt drwxr-xr-x 6 openhab openhab 4096 Apr 24 21:07 openhab2
When I run
sudo su -s /bin/bash -c '/opt/openhab2/start.sh' openhab
Also openhab2.service works for /opt but not if modified for external hdd location.
My linux knowledge is limited. Definitely I’m stuck and don’t know what to do, seeking help to run OH2 on external HDD.