javaguy Posted February 17, 2004 Report Share Posted February 17, 2004 I'm writing a script to grab all my digital photos off a flash memory card, and there doesn't seem to be any way to do it without root privileges (even root can't change the ownership/permissions of the stuff on the flash card, only cp it to the drive and change the ownership of the copy). So here's my sudoers entry: javaguy ALL= (root) /bin/cp -R /mnt/flash/* /home/javaguy/* When my script gets to here: sudo /bin/cp /mnt/flash/dcim/100olymp/* $DIRECTORY I get this error: Sorry, user javaguy is not allowed to execute '/bin/cp /mnt/flash/dcim/100olymp/* /home/javaguy/Documents/Photos/2004/February/batch1' as root on dhcp024-209-107-057.woh.rr.com. Now /home/javaguy/Documents/Photos/2004/February/batch1 definitely exists at the point it gets here, and /mnt/flash/dcim/100olymp is the directory containing all the JPGs on my flash card. I have confirmed this. But I can't copy. Any ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
ac_dispatcher Posted February 17, 2004 Report Share Posted February 17, 2004 First make sure you are editing the sudoers file correctly. root ALL=(ALL) ALL the syntax of this line is: user machine=(effective user) command try- javaguy ALL=(ALL) /bin/cp or to sudo any command: javaguy ALL=(ALL) ALL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.