when I try to copy any file with scp on Mac OS X Snow Leopard from another machine I get this error:

scp me@ .

---> Couldn't open /dev/null: Permission denied

this is the output of "ls -l /dev/null":

crw-rw-rw-  1 root  wheel    3,   2 May 14 14:10 /dev/null

I am in the group wheel, and even if I do "sudo scp..." it doesn't work. It's driving me crazy, do you have any suggestion? Thanx!

  • Thanx paul, but I'm still getting the same error, I cannot understand what's the problem with my /dev/null :/ – Robert May 14 '10 at 14:12
  • Have you tried replacing . with the name of the file? e.g., scp me@ file.zip ? – Nitrodist May 31 '11 at 20:52

I use scp (and rsync et al) all the time on OS X 10.6 without any problems.

Try this though:

% scp me@ ./

If that still doesn't work then try:

% ssh me@
% ls

to make sure that you can actually make an SSH connection the machine in question and view the home directory.


Quite possibly this is a problem in your startup file(s) in the remote host. If you can ssh normally to the remote host, then try temporarily moving your .profile, .bashrc, (or whatever startup files that you may have on that host) to other names and then retry your scp command.


I assume /dev/null is on the remote server? Have you tried SSH'ing in (like Paul suggested) and checking the permissions on /dev/null? If it isn't 666, you should chmod it to that, I believe.


Are you sure that the remote path is correct? /home/me/file.zip is not a standard path on OS X -- it'd be more like /Users/me/file.zip.

Test with simple paths:

File in home directory:

scp me@ .

File in /tmp:

scp me@ .

What about the status of your current directory on the local side -- did you nuke it in a different terminal session but not cd out of it?

Test by using an explicit local directory:

scp me@ /tmp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy