php-pandit Posted August 26, 2006 Share Posted August 26, 2006 Hi Plz, help me out i want to allow one of my linux user to run this below bash script to take mysql database backup.[b]Shell Script:[/b]<!---------------- ##################### ----------------------->#!/bin/bashTIMESTAMP=`date +%m-%d-%y-%H%M`cd /home/backups/mysqlfind /home/backups/mysql/*.tar.gz -mtime +7 -exec rm -f {} ;# my databaseDBNAME=my_databasemysqldump --opt -c -e -Q -u MYSQL_USER -p'MYSQL_PASSWORD' $DBNAME > $DBNAME.sqltar czpf $DBNAME.$TIMESTAMP.tar.gz $DBNAME.sqlrm -f $DBNAME.sql<!---------------- ##################### ----------------------->But when i am running this script as a normal user it is giveing me an error of [b]"Permission denied"[/b]ThanksHarshad Panditalias(PHP Pandit)<a href="http://php-pandit.blogspot.com/">Harshad Pandit's Blog</a> Link to comment https://forums.phpfreaks.com/topic/18693-how-to-allow-normal-linux-user-to-run-particulare-bash-shell-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.