Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cdatwood

    (@cdatwood)

    I ran into this problem specifically pushing my live site to a dev site on the same server. I’m going to try deleting all WP files on the dev site, and having SitePush create them so they’ll have the right permissions.

    But I will still have this problem pushing from my dev environment to my production environment, where deleting all files and doing a push may not be an option.

    Thread Starter cdatwood

    (@cdatwood)

    Okay, my suspected solution did not work. Rsync just complained that the files weren’t there. I can email my debug file (level 3) if that would be helpful.

    Thread Starter cdatwood

    (@cdatwood)

    Update:

    I think my issue is related to the user that rsync is using, as opposed to the owner of the actual files. What user does rsync use by default, or where can I look on my machine to find out?

    rsync will just use whatever user it is being run as, which for SitePush means the user your web server runs under for any given site. If your dev site and live site are running under different users then this is always going to be a bit tricky.

    If you can, set things up so that live and dev sites run under the same user. Alternatively if that’s not possible, you could set it so both users are members of the same group, and make sure that all files on both sites are group writeable.

    Whether or not any of this is possible really depends on your server setup. If you are on a shared server managed by a hosting company it’s possible they won’t let you do any of that.

    Two other things to consider if you are on shared hosting:-

    • make the dev site a subdomain install of the live site. Sometimes subdomains have the same user/permissions as the main site.
    • have both dev and live sites on the same vhost as described in SitePush docs – there are some disadvantages to that setup, but at least file permissions won’t be an issue.

    Do let me know how you get on.

    Thread Starter cdatwood

    (@cdatwood)

    Okay, on this particular server setup the server runs an Apache user — which I believe is what should be executing this rsync based on your previous post.

    I changed the ownership of the files to apache:apache, and now it works like a charm. I also added my FTP user to the group apache, so that I can still edit and access those files as needed.

    Great – thanks for following up.

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