Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7646763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:17:28+00:00 2026-05-31T10:17:28+00:00

I have a bash script to sync a Zendframework site between two servers, but

  • 0

I have a bash script to sync a Zendframework site between two servers, but for some reason one file doesn’t get the correct owner/group. Since the file then becomes unreadable by apache the site goes down on that server.

On the first server I have the following file:

-rwxrwx--- 1 monit www-data 4184 2012-03-14 05:39 application.ini

This should be exactly the same on the second server since both the user monit and the group www-data exists there to, but this is not the case as seen below.

-rwxrwx--- 1 monit monit    4184 2012-03-14 05:39 application.ini

This file is the only one affected. All other files gets the correct permissions, owners and groups. The rsync command is as follows

rsync -az --delete --stats  --include="document_root/.*" --exclude=".*" SERVER1 SERVER2

rsync is version 3.0.3, Server 1 is a Ubuntu 9.04 and Server2 is Debian 5.0

At the moment the problem is circumvented by setting the permission on the original file to -rwxrwxr–. The synced file will still have the wrong group, but is at least readable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:17:29+00:00Added an answer on May 31, 2026 at 10:17 am

    Check that monit user is in www-data group on the target server.
    Try rsyncing the problematic file only, while running rsync on the target server and add one or more -v options, then look at the output:

    $ groups monit |grep www-data
    $ rsync -avv source_host:path/to/application.ini ./application.ini
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bash script which I wrote that lists out some servers/user names.
I have a bash script that creates a Subversion patch file for the current
I have a bash script to upload some files to my webserver. The problem
I have a bash script file which starts with a function definition, like this:
I have a bash script that cuts out a section of a logfile between
I have a bash script that sources contents from another file. The contents of
I have a bash script (.sh file) and a Python script (.py) file in
I thought doing a sync in my bash script would force the file to
I have bash script which works well but when I send it back with
I have a bash script that does some parallel processing in a loop. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.