I'm sure it's been asked and answered many times, but I can't seem to find an answer. Maybe this question will link someone else to the right answer.
Here's the problem:
~$ sudo ls
ls: cannot open directory .: Permission denied
Here's what I want to do:
~$ sudo cp synergy.conf /etc
Here's what happens:
cp: cannot stat `synergy.conf': Permission denied
Here's what I end up doing:
~$ cp synergy.conf /tmp
~$ sudo cp /tmp/synergy.conf /etc/
What can I do to make this easier? Is there a way to give sudo privileges to see my home directory?
sudo-ing to root, why not just usesu -cwhensudohits corner cases? – new123456 Aug 9 '11 at 21:10$ sudo su -c "mv foo /etc"yieldsmv: cannot open 'foo' for reading: Permission denied. My current directory is on a local machine. Yes. – umop Aug 15 '11 at 22:01