WordPress.org

Ready to get started?Download WordPress

Forums

SitePush
[resolved] File permissions (9 posts)

  1. Rob Vermeer
    Member
    Posted 1 year ago #

    Hi,

    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.xxxxx.com xxxxx #2 SMP Thu Nov 17 12:17:59 CET 2011 x86_64
    SitePush dir: /home/tester/domains/xxxx.xxxx.com/public_html/wp-content/plugins/sitepush
    WordPress abspath: /home/tester/domains/xxxx.xxxx.com/public_html/
    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:
    
    Array
    (
        [cache] =>
        [label] => Live Site
        [domain] => xxxx.xxxx.com
        [web_path] => /home/tester/domains/xxxx.xxxx.com/public_html
        [db] => live
        [live] => 1
        [name] => live
        [default] =>
        [caches] =>
        [domains] => Array
            (
                [0] => xxxx.xxxx.com
            )
    
        [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] =>
    )

    http://wordpress.org/extend/plugins/sitepush/

  2. Mark Rowatt Anderson
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Rob Vermeer
    Member
    Posted 1 year ago #

    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!

  4. Mark Rowatt Anderson
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. vloo
    Member
    Posted 1 year ago #

    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.

  6. Mark Rowatt Anderson
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  7. vloo
    Member
    Posted 1 year ago #

    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. :)

  8. Mark Rowatt Anderson
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  9. vloo
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.