[Csync2] Re: Csync2 Help ( Permission Denied)

Nitin Kataria nkataria at dataarmor.net
Tue Nov 22 17:01:54 CET 2005


Nitin Kataria wrote:

>
> Thanks a lot , it seems to be working now . but i'm getting the* 
> permission denied* error while syncing the files/ dirs. However the 
> key file is same, permission for key and certificate are 777 .
> I even posted same certificates but its not working.
> kindly look below , any suggestion would be a great help .
>
> _MACHINE 1_
>
> *[root at av csync2-1.22]# csync2 -x -v -v
> My hostname is av.com.
> Database-File: /var/lib/csync2/av.com.db
> Config-File:   /etc/csync2.cfg
> Running recursive check for / ...
> SQL: SELECT filename from file where filename = '/' or 1 ORDER BY filename
> SQL Query finished.
> Checking /* ..
> Don't check at all: /var
> Don't check at all: /usr
> Don't check at all: /tmp
> Don't check at all: /sbin
> Don't check at all: /root
> Don't check at all: /proc
> Don't check at all: /opt
> Don't check at all: /mnt
> Don't check at all: /misc
> Don't check at all: /lost+found
> Don't check at all: /lib
> Don't check at all: /initrd
> Don't check at all: /home
> Don't check at all: /hardware.wci
> Don't check at all: /guestbook
> Don't check at all: /grey
> Don't check at all: /etc
> Don't check at all: /dev
> Don't check at all: /dailycount
> Don't check at all: /boot
> Don't check at all: /bin
> Match (+): /av on /av
> Checking /av.
> SQL: SELECT checktxt FROM file WHERE filename = '/av'
> SQL Query finished.
> Checking /av/* ..
> Match (+): /av on /av/moose
> Checking /av/moose.
> SQL: SELECT checktxt FROM file WHERE filename = '/av/moose'
> SQL Query finished.
> Match (+): /av on /av/avsubdir1
> Checking /av/avsubdir1.
> SQL: SELECT checktxt FROM file WHERE filename = '/av/avsubdir1'
> SQL Query finished.
> Checking /av/avsubdir1/* ..
> Match (+): /av on /av/avsubdir1/avsubdir2
> Checking /av/avsubdir1/avsubdir2.
> SQL: SELECT checktxt FROM file WHERE filename = '/av/avsubdir1/avsubdir2'
> SQL Query finished.
> Checking /av/avsubdir1/avsubdir2/* ..
> Match (+): /av on /av/avsubdir1/avsubdir2/avsubdir3
> Checking /av/avsubdir1/avsubdir2/avsubdir3.
> SQL: SELECT checktxt FROM file WHERE filename = 
> '/av/avsubdir1/avsubdir2/avsubdir3'
> SQL Query finished.
> Checking /av/avsubdir1/avsubdir2/avsubdir3/* ..
> Match (+): /av on /av/av.txt
> Checking /av/av.txt.
> SQL: SELECT checktxt FROM file WHERE filename = '/av/av.txt'
> SQL Query finished.
> Don't check at all: /.fonts.cache-1
> Don't check at all: /.automount
> Don't check at all: /.autofsck
> SQL: SELECT peername FROM dirty GROUP BY peername ORDER BY random()
> SQL Query finished.
> SQL: SELECT filename, myname, force FROM dirty WHERE peername = 
> 'test1.com' ORDER by filename ASC
> SQL Query finished.
> Connecting to host test1.com (SSL) ...
> Match (+): /av on /av
> Updating /av on test1.com ...
> While syncing file /av:
> ERROR from peer test1.com: Permission denied!
> File stays in dirty state. Try again later...
> Match (+): /av on /av/av.txt
> Updating /av/av.txt on test1.com ...
> While syncing file /av/av.txt:
> ERROR from peer test1.com: Permission denied!
> File stays in dirty state. Try again later...
> Match (+): /av on /av/avsubdir1
> Updating /av/avsubdir1 on test1.com ...
> While syncing file /av/avsubdir1:
> ERROR from peer test1.com: Permission denied!
> File stays in dirty state. Try again later...
> Match (+): /av on /av/avsubdir1/avsubdir2
> Updating /av/avsubdir1/avsubdir2 on test1.com ...
> While syncing file /av/avsubdir1/avsubdir2:
> ERROR from peer test1.com: Permission denied!
> File stays in dirty state. Try again later...
> Match (+): /av on /av/avsubdir1/avsubdir2/avsubdir3
> Updating /av/avsubdir1/avsubdir2/avsubdir3 on test1.com ...
> While syncing file /av/avsubdir1/avsubdir2/avsubdir3:
> ERROR from peer test1.com: Permission denied!
> File stays in dirty state. Try again later...
> Match (+): /av on /av/moose
> Updating /av/moose on test1.com ...
> While syncing file /av/moose:
> ERROR from peer test1.com: Permission denied!
> File stays in dirty state. Try again later...
> SQL: SELECT command, logfile FROM action GROUP BY command, logfile
> SQL Query finished.
> Finished with 6 errors.*
>
> _MACHINE 2_
>
> *Csync2 daemon running. Waiting for connections.
> <14549> New connection from 192.168.197.121:33136.
> <14549> Connection closed.*
>
>
> Regards,
> Nitin Kataria
>
>
>
> Michael Milkovich wrote:
>
>> In the log, I see that /test is not being checked.  In your config 
>> file, change
>>
>> include /test/;
>>
>> to
>>
>> include /test;
>>
>> then, as Miguel suggested, touch a file in /test -- e.g. touch 
>> /test/moose.  then rerun csync (with the -vv so you can see that it 
>> is checking this new file).  I think this should help.
>>
>>-- 
>>    Mike Milkovich
>>    Partner, Warecorp
>>    www.warecorp.com
>>
>>
>>
>> Nitin Kataria wrote:
>>
>>>
>>> Helo Micahel,
>>>
>>> Thanks a lot for suggestipon first. Here is my config file . These 
>>> two machines are running over different network with VPN 
>>> connectivity. { Machines are very much reachable }
>>>
>>>
>>> *[root at av root]# cat /etc/csync2.cfg
>>> group mygroup
>>> {
>>>         host 192.168.198.128 192.168.197.121 ;
>>>       #  host (host4 at host4-eth2);
>>>
>>>         key /etc/csync2.key_mygroup;
>>>
>>>        # include /etc/apache;
>>>        # include %homedir%/bob;
>>>        # exclude %homedir%/bob/temp;
>>>
>>>         include /test/;
>>>         #exclude *~ .*;
>>>
>>>         action {
>>>                 pattern /etc/httpd/conf/httpd.conf;
>>>                 pattern /var/www/html/*;
>>>                 exec "/usr/sbin/apache2ctl graceful";
>>>                 exec " echo "This is done"";
>>>                 logfile "/var/log/csync2_action.log";
>>>                 do-local;
>>>         }
>>>
>>>         auto none;
>>> }
>>>
>>> #prefix homedir
>>> #{
>>> #        on host[12]:
>>> #                /users;
>>> #        on *:
>>> #                /home;
>>> #}
>>>
>>> #nossl host2 host3;
>>> #nossl host3 host2;
>>>
>>> #config /etc/csync2.cfg_anotherone;
>>> #config /etc/csync2.cfg_foo /etc/csync2.cfg_bar;
>>>
>>> *and my output for "csync2 -c -r -v -v"   [ Its kind of similar to 
>>> "csync2 -x -vv" ]*
>>>
>>> [root at av root]# csync2 -c -r -v -v  /
>>> My hostname is av.com.
>>> Database-File: /var/lib/csync2/av.com.db
>>> Config-File:   /etc/csync2.cfg
>>> Running recursive check for / ...
>>> SQL: SELECT filename from file where filename = '/' or 1 ORDER BY 
>>> filename
>>> SQL Query finished.
>>> Checking /* ..
>>> Don't check at all: /var
>>> Don't check at all: /usr
>>> Don't check at all: /tmp
>>> Don't check at all: /test
>>> Don't check at all: /sbin
>>> Don't check at all: /root
>>> Don't check at all: /proc
>>> Don't check at all: /opt
>>> Don't check at all: /mnt
>>> Don't check at all: /misc
>>> Don't check at all: /lost+found
>>> Don't check at all: /lib
>>> Don't check at all: /initrd
>>> Don't check at all: /home
>>> Don't check at all: /hardware.wci
>>> Don't check at all: /guestbook
>>> Don't check at all: /grey
>>> Don't check at all: /etc
>>> Don't check at all: /dev
>>> Don't check at all: /dailycount
>>> Don't check at all: /boot
>>> Don't check at all: /bin
>>> Don't check at all: /.fonts.cache-1
>>> Don't check at all: /.automount
>>> Don't check at all: /.autofsck
>>> SQL: SELECT command, logfile FROM action GROUP BY command, logfile
>>> SQL Query finished.
>>> Finished with 0 errors.
>>>
>>> *I'm still stuck , feeling lost at the moment . Please give some 
>>> direction .
>>>
>>> Thanks,
>>> Nitin Kataria
>>>
>>> Michael Milkovich wrote:
>>>
>>>> Nitin:
>>>>
>>>> the first thing I would try is turn on the verbose messages to see 
>>>> what csync is doing...
>>>>
>>>> csync2 -x -vv
>>>>
>>>> turns on pretty verbose mode
>>>>
>>>> You can tell if items are scheduled for updating but have not yet 
>>>> been sent over to the remote host(s) by using csync2 -M   -- this 
>>>> displays the content of the "dirty" table.
>>>>
>>>> If no joy, send me a copy of your config files and the output from 
>>>> "csync2 -c -r -v -v  /"
>>>>
>>>> -- Mike
>>>>
>>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linbit.com/pipermail/csync2/attachments/20051122/9e843b91/attachment.html


More information about the Csync2 mailing list