Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Issue with rsyncing a file - why just this one file (on all websites)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Issue with rsyncing a file - why just this one file (on all websites)

myhkenmyhken Member
edited February 2015 in General

I do use rsync to sync my main server with my Live backup servers all day. No issues at all, beside on file:php5.fcgi I can't copy it, I can't change rights on the file etc.
Also, in the folders on my backup servers there are a second file: php5.6.fcgi and I can't delete the file, or change the rights. I using root as my user, so I should have full access to my own files?

The files is in every website folder under /home/website/fcgi-bin. The website user is set as owner, and the file rights is 644, and the folder 755. Still, when I`m using root as user, I should have access to make changes to users rights on the folders and the files. But no.

See here: chown: changing ownership of /home/website/fcgi-bin/php5.fcgi': Operation not permitted

Using: chown -R root /home/website/fcgi-bin

Also tried via Virtualmin Filemanager also as root.

Why?

I'm using Remi repo and PHP 5.6.5, and I pretty sure the error got there when I started using Remi repo.

There is no real problem, it do not mess up anything. Beside see all the error messages from rsync about the file and folder on each website from three different servers rsyncing to two backup servers all day long.

Maybe a way to ignore the files on each website in the rsync command copying the files?
Or how to change user rights on the folder and files, so I can copy and/or delete the files there?

Comments

  • @NodeKid said:
    try

    chattr -R -a -i -s /home/**/fcgi-bin

    Will do, but first, do anybody know what the file do, and why is "impossible" to change or delete? Maybe ok to know before I f*** up my system.
    It's only my live system I have this error on, so will do not test to much without knowing for sure that it's a good thing to delete it or copy it, after I have changed the rights.

  • wychwych Member
    edited February 2015

    @myhken said:
    so I can copy and/or delete the files there?

    The file is probably in use.

    @myhken said:
    do anybody know what the file do

    FCGI Scipt? - http://www.fastcgi.com/drupal/?q=node/17

    Thanked by 1myhken
  • @wych said:

    Do I need it? Just a normal CentOS 6.6 with Virtualmin, running some small WordPress sites. Is it something the Remi repo needs? (or install)

  • maybe file is open " in use" , try to close some service.

    maybe this helps one time

    setfacl -R -m u:$USER:rwx -m u:$USER:rwX /pathtofile/thefile

    Thanked by 1myhken
  • its an fcgi-wrapper which is individually setup per user and secured with immutable bit...

    fcgi-wrappers are used to switch user on cgi-process (here php-fcgi) to specific owner and to load individual config like different php-version and/or php-settings.

    I am relativly sure this is intentionally with virtualmin, just too lazy for googling about proof ;-)

    removing immutable bit with chattr as root may work for some time, but probably virtualmin will reset this if it comes to rewrite configs...

    i'd prefer looking into rsync-options, if there is something to do about on that side...

    Thanked by 14n0nx
  • FalzoFalzo Member
    edited February 2015

    PS: rsync normally should copy this file too, but cause of being unable to overwrite it at the destination I'd guess it makes a new copy, which is why you see something like the file numbered .6 ... not sure though.

    if you don't want to rsync this files at all you could go for one of the rich exclude-options with rsync, but I am pretty sure this file is an essential one for running your individual websites ;-) (maybe thats why its secured via immutable bit)

    PPS: had another look into my rsync-backups which contain some immutable files too, but can't see any problems - which options/switches are you using with rsync?

  • Falzo said: PS: rsync normally should copy this file too, but cause of being unable to overwrite it at the destination I'd guess it makes a new copy, which is why you see something like the file numbered .6 ... not sure though.

    No, the number 5.6 is PHP 5.6 that I used when I installed the backup server. On the "old" server I started using 5.4.x when I started using the Remi repo.

    But you are right that rsync try to create a copy of the file, but it refused, because it has no rights on the folder.

  • myhken said: But you are right that rsync try to create a copy of the file, but it refused, because it has no rights on the folder.

    so probably not only the file but the whole folder is set immutable... uff.
    I have to admit, that I don't exactly know, if there is a way around with rsync, as I don't had to deal with this yet ;-)

    Thanked by 1myhken
  • mikhomikho Member, Host Rep

    Exclude the file and/or folder when rsyncing the file/folder.

    read the man for rsync for complete parameter.

    Thanked by 1myhken
  • I found a solution in rsync. Using this command inside my rsync command exclude the folder (and the file): --exclude 'fcgi-bin' seen from the date the files has been changed, it's seems like the file in that folder only was created the day the server was installed. After that no change on any site. And since I used Virtualmin restore backup when I installed the backup servers, the file is there also. So the sites is working fine on my live backup servers. So problem solved. :D Thank you for all the help here.

Sign In or Register to comment.