Search code examples
linux

cp: cannot create directory : No such file or directory


I am trying to copy a folder from a source to a destination but I am getting the following error:

cp: cannot create directory ‘/home/Workspace/Release/addons/’: No such file or directory

I entered the following command:

cp -R /home/Workspace/Dev/user1/addons/account /home/Workspace/Release/addons/

I tried the same command with different folders and it worked fine.

cp -R /home/Desktop/file_transfer/f1/ff1 /home/Desktop/file_transfer/f2/

Can anyone tell me what the problem is?

Permissions for that directory:

drwxrwxr-x 363 user1 user1  16384 Sep 16 21:57 addons

Solution

  • You are getting a permission denied error.

    Change the permissions of the addon directory using

    sudo chmod -R 755 /home/Workspace/Release/addons/