Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

scp me@192.168.1.10:/home/me/file.zip .
Password:
...

---> 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!

share|improve this question

migrated from stackoverflow.com May 16 '10 at 4:35

This question came from our site for professional and enthusiast programmers.

    
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@192.168.1.10:/home/me/file.zip file.zip ? –  Nitrodist May 31 '11 at 20:52

4 Answers 4

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@192.168.0.10:file.zip .

File in /tmp:

scp me@192.168.0.10:/tmp/file.zip .

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@192.168.0.10:/Users/me/file.zip /tmp
share|improve this answer

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.

share|improve this answer
    
To wit, see my question on Ask Different apple.stackexchange.com/questions/13802/… –  msanford May 31 '11 at 20:38

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.

share|improve this answer

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

Try this though:

% scp me@192.168.1.10:file.zip ./

If that still doesn't work then try:

% ssh me@192.168.1.10
% ls

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.