Jump to content

sudoers newbie help


javaguy
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...