Viewing 14 replies - 16 through 29 (of 29 total)
  • Thread Starter miguelkennedy

    (@miguelkennedy)

    It should be in the wp-content folder of wordpress site

    edpirone

    (@edpirone)

    Not getting anything generated on this end. I think I might just axe this whole thing completely and export the db, import to a new db and copy the files over to a new directory.

    This is turning into a “thing”.

    Thread Starter miguelkennedy

    (@miguelkennedy)

    Can you check your apache and php logs? They might contain useful information regarding the fact that the copy process fails..

    edpirone

    (@edpirone)

    I have access to that stuff but I am not sure how to find them. I am FTP’d into the root right now.

    Thread Starter miguelkennedy

    (@miguelkennedy)

    I don’t use apache but I think the logs should be in /var/log/apache2/ and php in /var/log/php

    edpirone

    (@edpirone)

    doesn’t look like I am generating a PHP error log and the apache log definitely doesn’t have anything useful. I just looked through it to make sure there was no sensitive information. Nothing that relates to this at all.

    Thread Starter miguelkennedy

    (@miguelkennedy)

    edpirone

    (@edpirone)

    I think I found em.

    Getting a lot of errors like this.

    [Thu Mar 03 13:28:50 2016] [error] [client MY.IP.ADDRESS] PHP Warning: copy(/var/www/vhosts/sharphat.com/httpdocs/stage/google925ea119100090e1.html): failed to open stream: No such file or directory in /var/www/vhosts/sharphat.com/httpdocs/wp-content/plugins/wp-staging/includes/template-functions.php on line 907, referer: https://sharphat.com/wp-admin/admin.php?page=wpstg_clone
    [Thu Mar 03 13:28:52 2016] [error] [client MY.IP.ADDRESS] PHP Warning: mkdir(): Permission denied in /var/www/vhosts/sharphat.com/httpdocs/wp-content/plugins/wp-staging/includes/template-functions.php on line 877, referer: https://sharphat.com/wp-admin/admin.php?page=wpstg_clone
    [Thu Mar 03 13:28:52 2016] [error] [client MY.IP.ADDRESS] PHP Warning: mkdir(): No such file or directory in /var/www/vhosts/sharphat.com/httpdocs/wp-content/plugins/wp-staging/includes/template-functions.php on line 962, referer: https://sharphat.com/wp-admin/admin.php?page=wpstg_clone
    [Thu Mar 03 13:28:52 2016] [error] [client MY.IP.ADDRESS] PHP Warning: copy(/var/www/vhosts/sharphat.com/httpdocs/stage/wp-admin/options-discussion.php): failed to open stream: No such file or directory in /var/www/vhosts/sharphat.com/httpdocs/wp-content/plugins/wp-staging/includes/template-functions.php on line 907, referer: https://sharphat.com/wp-admin/admin.php?page=wpstg_clone

    edpirone

    (@edpirone)

    Looks like it is saying that the file doesn’t exist but it definitely does.

    edpirone

    (@edpirone)

    Jesus christ. I logged in as Root and went to the httpd folder and changed permissions from 755 to 777 and now it looks like it is working. I had previously changed every folder in the root and file to 777 and I assume that would be enough.

    It might be a nice added on to address a scenario like this in the actual plugin. Obviously you guys have to make a living though so the amount of attention you gave me today is outstanding. Ill be back in 10 to let you know if this worked.

    Thread Starter miguelkennedy

    (@miguelkennedy)

    edpirone… DId it work? Are you able to make staging sites with wp-staging plugin?

    Plugin Author Rene Hermenau

    (@renehermi)

    @miguelkennedy at first thank you for the outstanding support. Thats really awesome:)

    @edpirone its not recommended to have all files and folders to permission 777 and usually thats not needed for wp staging. I think the permission issue can be fixed as well when you keep 755 for folders and 644 for files and just change the owner of the files and folders to the same owner php is running under. This owner is often named www-data or www depending on your configuration.

    I am going to create a FAQ which treats the issues you had so other guys will not run into same results:)

    Thread Starter miguelkennedy

    (@miguelkennedy)

    Rene, no problem ??

    I was going to say the same thing about the permissions security risks…

    edpirone, here’s what I recomend:

    1) Go here https://gist.github.com/Adirael/3383404 and click the “Download ZIP” button.
    2) Unzip the file, open the sh file with notepad (if you’re on windows) or textmate if you’re on mac).
    3) Change WP_ROOT=$1 to WP_ROOT=/var/www/vhosts/sharphat.com/httpdocs/
    4) Save the file

    I’m going to assume you’re on a Linux/Ubuntu server. If not, let me nknow.

    5) FTP to your server with root and place the sh file in /usr/local/etc/

    Now you need to login to your server with SSH… If you have root access then you should have SSH access as well.

    Once you’re logged in with SSH type the following command:

    sudo /bin/bash /usr/local/etc/fix-wordpress-permissions.sh

    It will take at least 1-2 minutes to run and you’ll have ALL files and folders of your wordpress installation with correct permissions based on recommendations
    from https://codex.www.ads-software.com/Hardening_WordPress#File_permissions

    Do this as soon as possible because you’re site is currently at risk. Never give full 777 permissions to an entire site.

    Hope this helps

    edpirone

    (@edpirone)

    Yea guys. I got everything working. I am now switching the folders/files to 755/644 respectively. I just was shocked that the main issue was the root folder had to be 777 for it to work. Once that worked it was smooth as can be. I assumed it was a permission thing from the beginning but once I had switched literally everything to 777 except for the root I got really confused it wasn’t working. Anyway. Thank you.

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘Copy File Error’ is closed to new replies.