0

I downloaded Magento 2.0 into Downloads folder and extracted all the files into temp_extract. Now I want to copy all files inside temp_extract into var/www/magento. I cannot figure out how to do it. I tried several copy command-lines, but none worked. Also, I tried several file managers, including Gentoo, Xfe, PCManFM, and Nemo. None of them helped. I have given all permissions, i.e., d rwx rwx r-x, to magento directory. With most file managers when I copy and paste the files, they say that I do not have permissions. With Gentoo, I ended up transferring temp_extract into magento directory, but I couldn't figure out the command-line to move from temp_extract into magento. I am using Ubuntu 14.04. Can anyone help? Thanks.

  • is itwww/var/magentoor /var/www/magento & why you want to move to /var/www/ directory? – d a i s y Jan 8 '16 at 9:07
  • Sorry it is var/www/magento. Because I am installing magento in that directory, according to instructions given. – Brian Jan 8 '16 at 9:13
  • @Brian ok but that does NOT mean you copy the installation files to /var/www/ ;-) – Rinzwind Jan 8 '16 at 9:21
  • do u have a folder magento in /var/www/? – d a i s y Jan 8 '16 at 9:21
  • I haven't yet figured out how to install magento. I do have a folder magento in /var/www/. – Brian Jan 8 '16 at 9:23
0

You have to be superuser in order to copy something to /var/www and since you are copying a folder you need to include the -R parameter to the cp command for it to copy recursively. It would be something like this:

sudo cp -R ~/Downloads/temp_extract/ /var/www/magento/
  • I have been typing everything as a superuser. I typed sudo su. I also added sudo before every command. Still I am getting the same cannot stat error message. – Brian Jan 8 '16 at 19:03
  • @Brian If you give me a download link to your package, I will install it on my pc and then give you instructions, but I have to make sure we have the same package. – Mark Kirby Jan 8 '16 at 19:10
  • @mark Here is the download link to Magento CE 2.0: [magentocommerce.com/download] Thanks. – Brian Jan 8 '16 at 19:20
  • @mark I have already spent four days trying to install magento; it may end up taking a lot of your time. I will post the question on Magento's company blog or on StackExchange Magento. – Brian Jan 8 '16 at 19:27
0

The file mangers gives you a permission denied error as you are copying files in to a folder owned by root, /var,you should not change the permissions of system folder like /var, you have two options to move these files, first

sudo cp /file/you/want/to/copy /folder/you/want/to/copy/to

If you like to move them via a gui you can run a root gui like this

gksu nemo

You can swap nemo for the name of your favourite file manager.

To copy the specific files you requested, this is the correct syntax

sudo cp -R ~/Downloads/temp_extract/ /var/www/magento/

As you say in comments

I haven't yet figured out how to install magento

You should provide the download you used and any tutorial you followed as it seems unlikely you would need to copy these files manually, there is possibly some kind of installation script you can run to automate the processes.

  • @ mark It doesn't work. Still I am getting the message: cp: cannot stat 'Downloads/temp_extract/*': No such file or directory The problem is I have to copy the file two directory backward to the root directory, and then three directory forward to the magento directory. Still I haven't figured out the copy command for this. – Brian Jan 8 '16 at 18:33
  • Try the edited command – Mark Kirby Jan 8 '16 at 18:38
  • Page not found.... @Brian, please comment here to not fill up jorges notifications with our conversation. – Mark Kirby Jan 8 '16 at 19:22
  • You mean this? magentocommerce.com/download – Mark Kirby Jan 8 '16 at 19:25
0

If you want to just copy all of the files from one dir to the other recursively, you can use something like this:

cp -r /home/user1/dir1/* /var/www/dir2/

If you wanted to copy the entire directory recursively, it would look more like this:

cp -r /home/user1/dir1 /var/www

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.