Cygwin responds with Permission Denied when I try to copy a file

-4

I am a complete beginner to Cygwin and am trying to copy a file.

cp /cygdrive/c/Users/name/Downloads/file_name .

Cygwin responds with

cp: cannot create regular file `./file_name': Permission denied

How can I fix this?

idude

Posted 2013-06-20T03:15:30.760

Reputation:

2Do you have access to write to your current directory? You will need to check this by looking at the security properties for your current directory. – Chris Jester-Young – 2013-06-20T03:19:18.240

And your current working directory is...? – Breakthrough – 2013-06-20T12:49:19.053

Answers

-1

Try using:

sudo cp /cygdrive/c/Users/name/Downloads/file_name .

And entering your password when the prompt comes. If sudo doesn't work, try using "su" instead. As noted above, make sure you have write access on the directory you are in. If you go root (using sudo or su), you should automatically have write access. You could also just copy it over manually?

Roguebantha

Posted 2013-06-20T03:15:30.760

Reputation: 101

1Did you read the question? su and sudo, while fine suggestions in any Linux environment, do not work in Cygwin, which is not Linux. – Aaron Miller – 2013-06-20T15:18:54.233