So, the problem is that you used root
account to install Blynk, the result is all files have owner:group = root:root, and you won’t have the right to access and execute while using pi
or another non-root
account. That’s why it only works when you’re using sudo su
to be root
.
The fix now is to change the files’ ownership back to pi
or whatever account you’re using. Let’s say pi
.
I assume that you have all Blynk server files installed in /home/pi/Blynk
. You have to use the following command while you’re using pi
account:
# comment, don't run. Go to pi home directory
$cd /home/pi
# comment, don't run. Get ownership:group back to pi:pi
$sudo chown -R pi:pi /home/pi/Blynk
# comment, don't run. Change mode to -rwxr----- for all files. Not perfect but OK for now for you to run
$chmod -R 740 /home/pi/Blynk
Also please read the note about not using root
account unless absolutely necessary in:
One note is that you’d better not use root account in everyday job. One small mistake can destroy your system. Use pi or whatever account you create but root. Whenever you need root privilege, use sudo. Also change the default root and pi password.
pi@raspberrypi-02:~ $ sudo passwd root
pi@raspberrypi-02:~ $ passwd