Support » Plugin: SitePush » File permissions

  • Resolved Rob Vermeer



    I’ve been testing your plugin out and looks very promising.

    One thing I cannot seem to get to work is pushing or pulling to an existing WP install.

    When I push or pull to a location created by SitePush everything works as expected (really nice 🙂 ). But when I then do it form that location to the original location I get file permission errors.

    I tried changing all the files and folders to 777 and also tried to reset gid and uid in DirectAdmin, but nothings changed, still get the same error.

    “One or more files failed to copy correctly. Please make sure that the destination files and directories have the correct file permissions.” (3 times)

    Is there anything I could do about this?

    Debug info:

    SitePush version: 0.4.1
    SitePush options: OK
    WordPress version: 3.5
    WordPress multisite: No
    Site: Test
    PHP version: 5.3.10
    PHP safe mode: off
    Server user: apache
    Server groups: uid=497(apache) gid=501(apache) groups=501(apache),504(access)
    Server: Linux xxxxx #2 SMP Thu Nov 17 12:17:59 CET 2011 x86_64
    SitePush dir: /home/tester/domains/
    WordPress abspath: /home/tester/domains/
    sites_conf: 0644 tester(521) tester(523) (readable/parseable)
    dbs_conf: 0644 tester(521) tester(523) (readable/parseable)
    wp-config: 0777 tester(521) tester(523)
    SitePush config for this site follows:
        [cache] =>
        [label] => Live Site
        [domain] =>
        [web_path] => /home/tester/domains/
        [db] => live
        [live] => 1
        [name] => live
        [default] =>
        [caches] =>
        [domains] => Array
                [0] =>
        [wp_dir] =>
        [admin_only] =>
        [wp_content_dir] => /wp-content
        [wp_plugin_dir] => /wp-content/plugins
        [wpmu_plugin_dir] => /wp-content/mu-plugins
        [wp_uploads_dir] => /wp-content/uploads
        [wp_themes_dir] => /wp-content/themes
        [use_cache] =>

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mark Rowatt Anderson


    The error means that SitePush isn’t able to copy the files, which is almost certainly something to do with file permissions.

    If you set the debug level in SitePush options to ‘3’ you should get more information on what files are failing to copy and can make sure they have the correct permissions.

    If that doesn’t work, you could try deleting those files (or moving them… make sure you have a backup!), which might let SitePush copy fresh copies with the right permissions.

    I’m sure you know this, but it’s not a good idea to leave things set to 777 – particularly if you are on a shared server or have anything else running on your server.

    Thank you for your quick answer!

    When I changed the debug level to 3 I saw that every file wasn’t copied (“php_rsync: failed to copy”).

    I’ve changed the wp-content folder to wp-content-temp, created wp-content and temporary set to chmod 777 and then run SitePush on development website en pushed to live. That worked and now SitePush works both ways!

    I think the problem was with ownership of the files instead of permissions, because the file permissions are now lower, but the sync works great.

    Thanks for your help, great plugin!

    Plugin Author Mark Rowatt Anderson


    Glad you got it all working. If you could leave a review/rating that would be appreciated!

    Hey, Mark,

    I’d like to mention another tiny issue – again with File permissions:

    If a WordPress instance doesn’t have uploads dir, it throws the same error. Right after creating the directory in the source instance, it works just fine.

    Plugin Author Mark Rowatt Anderson


    @vloo I’m not able to replicate that – if there is no uploads directory, then WP creates one, so there should always be a uploads dir.

    If you can provide more info so we can narrow down exactly what conditions are causing the problem you are seeing I’ll investigate further.

    Let’s say the source site is an absolutely new WordPress installation. You’re getting uploads dir with the first uploaded image or other file, but not before that. So if we don’t have an uploads dir, the sync fails.

    If you can’t manage to replicate it even now, I’ll try to do it again and post there the debug info.

    It’s a minor issue after all, having in mind that people won’t have a case like mine, unless they are testing the plugin in local host with a fresh WP installation. 🙂

    Plugin Author Mark Rowatt Anderson


    SitePush doesn’t even need WordPress installed on a destination site to push files, as long as the directory for that site exists. Are you sure that the parent directory (wp-content in your case for uploads) has permissions set to allow SitePush to create the uploads directory?

    Well now I’m in doubt if apache had the writing permissions indeed. When I test the whole thing again, I’ll write you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘File permissions’ is closed to new replies.