Open kekec777 opened 1 year ago
I have exactly the same problem. Can anyone help? :-(
I have exactly the same problem. Can anyone help? :-(
I ended up creating my own image with docker build and now it's working. I can send what I exactly I added to the image latter or tomorrow
I have exactly the same problem. Can anyone help? :-(
I ended up creating my own image with docker build and now it's working. I can send what I exactly I added to the image latter or tomorrow
Oh that would be mega awesome for me! I look forward to your input! :-)
Soo from my own build (im executing from my own web page (user www-data) and im adding www-data to sudo:
FROM elkarbackup/elkarbackup:latest RUN echo 'www-data ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN usermod -a -G sudo www-data && usermod -a -G root www-data RUN chown -R root:www-data /app/uploads/ && chown -R root:www-data /etc/sudoers && chown -R root:www-data /etc/sudoers.d/
but i think this should resolve your problem (run these from container: "docker exec -ti elkarbackup bash") chown -R root:www-data /app/uploads/ and remember to make your .sh executable: chmod +x /app/uploads/000*
You can reply if this is working or not..
Describe the bug
A clear and concise description of what the bug is. Include the following information:
Steps to reproduce the behavior
Expected vs actual behavior
A clear and concise description of what you expected to happen and what actually happened. Expection is : Create backup and run the script
Actually happens: Backup is created succesfully , but when the script is trying to run i get an error (see log)
Logs
Paste log errors. Redact if needed.
ERROR | RunPostClientScriptsCommand | | Client "1" POST script "Notify via telegram" execution failed. Diagnostic information follows: sudo: unable to open /etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin -- | -- | -- | --My script is basic with just some: `#!/bin/bash starttime=$(date +"%m/%d/%Y %T")
echo -e "\n" &>> "/app/backups/PATH TO LOG FILE"; echo "Start date and time" $starttime &>> "/app/backups/PATH TO LOG FILE"; echo "Backup completed" $1 &>> "/app/backups/PATH TO LOG FILE";
endtime=$(date +"%m/%d/%Y %T") echo "End date and time" $endtime &>> "/app/backups/PATH TO LOG FILE"; echo -e "\n" &>> "/app/backups/PATH TO LOG FILE";
send telegram notification
curl "TELEGRAMCONFIGAPI" backup completed "$endtime >/dev/null 2>&1`
So basicly write into a log.txt file and then curl a telegram msg
I have tried to login as root to docker container and execute the .sh without any problem
I have strugled with this for couple hours now , so any advise is fully preciated
thanks in advise