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

3

1 Answer 1

-2

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?

1
  • 1
    Did you read the question? su and sudo, while fine suggestions in any Linux environment, do not work in Cygwin, which is not Linux. Jun 20, 2013 at 15:18

You must log in to answer this question.