Hell richardrichard_newberry wrote:All my files have owner of user cumulus by using chown -R cumulus:cumulus /home/cumulus/CumulusMX everything in that folder is the owner of user 'cumulus' and it works.
This is the best, in my oppinion. since the last version of my script, CumulusMX can be alternatively started as a non root user, for exmaple pi.
As I already mentioned, a mixed environemtn is not recommeneded. You nned to decide to use user pi or sudo.
when you try to start the ./cumulusmx.sh -s without sudo, you are starting the Scirpt and CumulusMX as the same user as you logged in. If you have started the Script with sudo before, you will get a warning message like this
1. sudo ./cumulusmx.sh -q (this will quit CumulusMX
2. ./cumulusmx.sh (to start CumulusMX as a normal user pi)
you will see this warning:
You are running CumulusMX not as root (sudo) but as user: pi - but I found files in /home/pi/CumulusMX/ which are having different owners
pi
root
This probably happened because this Script was previously started with sudo and now without sudo.
This might cause trouble, because of <Permission Denied> problems to read and write files.
Please fix this problem by using this command: sudo chown -R pi:pi /home/pi/CumulusMX/
This will change the owner of all files in /home/pi/CumulusMX/ to owner: pi
If you want to check the files and owners by yourself, please use this command:
sudo find /home/pi/CumulusMX/ -type f -printf '%u %p\n' |sort |more
you can now use this command, to list the file in CumulusMX/ folder hwich are not writeable by user pi
sudo find /home/pi/CumulusMX/ -type f -printf '%u %p\n' |sort |more
So before the script will start again, the onwership of all filesshould be set correctly.
If you decide ton conitnue woth sudo, it is okay as it is
But if you decide to work as user pi form now on, you need to set the ownershiup correctly by using this command
sudo chown -R pi:pi /home/pi/CumulusMX/
Form this moment, the init.d script should also be changed to (sudo nano /etc/init.d/cumulusmx)
CumulusMX_USER=pi
At reboot, CumulusMX will be started by user pi form now on.
If you dedcided to use always sudo to work with CumulusMX and but changed the /etc/init.d script to start as pi, it will not worlk and the script will terminate with the error messae above. But since the Script is being started at system boot, it can not display any error messages.
However richard, can you confirm, that the /etc/init.d script is starting on your RaspberryPi ?
Until now, I have only 3 own devices where I tested it successfully.
Jan