-1

I'm trying to copy all of the hidden files to a directory. The problem is I can't copy it into a new folder. I get Permission denied error. How do I fix this?

I used:

cp -rf /usr/include /cse220-p01
  • You don't have permission to write in /cse220-p01..try using sudo – heemayl Feb 8 '16 at 8:33
  • 3
    What is your end goal here? in what way is /usr/include "hidden"? – steeldriver Feb 8 '16 at 9:04
  • Whats the output you're getting? Do you have permission to work down /? Are you sure your destination directory is placed in /? – tachomi Feb 8 '16 at 14:42
  • The problem is that you don't have write access to the directory, so it is not letting you copy files there. One of the answers suggests using Sudo, but you claimed it was not working. This is most likely because your user is not listed in the sudoers file, meaning that you do not have permission to use sudo on this system. Long story short, it is giving you permission denied because you do not have permission. Contact the system admin for help. – John Militer May 28 at 17:40
1

Your user does not have the permission to write in the directory you are trying to copy the file. You can use root account or try with sudo -u "user" cp file path.

enter image description here

  • I tried doing the sudo user but its telling me that its not a sudoers file. I'm pretty new to linux Is there anything else I can try to do to get permission? – Hazel Feb 8 '16 at 8:51
  • can you put your command output here? – Piyush Jain Feb 8 '16 at 9:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.