RE: transfer interrupted, and Not privileged errors,

2000-11-08 Thread Grace M. Garcia


how do i unsubscribe from the list?

thanks!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Martin Pool
Sent: Wednesday, November 08, 2000 4:35 PM
To: Todd Robinson
Cc: [EMAIL PROTECTED]
Subject: Re: transfer interrupted, and Not privileged errors,


On 11 Oct 2000, Martin Pool [EMAIL PROTECTED] wrote:
 On Tue, Oct 10, 2000 at 09:39:20AM -0400, Todd Robinson wrote:

   rsync to marktg from fdops2
   wrote 32 bytes  read 2439031 bytes  total size 13862565
   transfer interrupted (code 102) at main.c(432)
 
 At least on Linux, 102 is 
 
   #define ENETRESET   102 /* Network dropped connection
 because of reset */

On SCO SystemV 5.0.5, 102 seems to be 

#define _TCPERR 90  /* Same as TCPERR above */
#define EADDRINUSE  (_TCPERR+12)/* Address already in use */

which is a kind of weird reason to get transfer interrupted...

-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
[EMAIL PROTECTED], http://www.linuxcare.com/
Linuxcare. Support for the revolution.





Re: transfer interrupted, and Not privileged errors,

2000-11-08 Thread Martin Pool

On  8 Nov 2000, Martin Pool [EMAIL PROTECTED] wrote:

  The unlink message went to the console not the file, it was:
  
   unlink rsync-2.4.6/lib : Not privileged
 
 That's pretty strange, for two reasons: as far as I knew, everything
 ought to go to stderr, stdout, or the log file.  When you say
 "console", do you mean it comes out in your current window, or it goes
 to the actual VGA adapter/serial console of the server?

Oh... and the second reason it's strange is that rsync is deleting
anything at all.  Todd, would you mind please

1. running with just the -r (recursive) flag, not -a (archive)

2. confirming that when copying the rsync source, the error occurs
even if the source directory is empty

3. Applying the attached patch (or equivalently building from CVS);
this will produce better explanations of where the error occurs.  If
you're concerned about disrupting the machines then it's OK to just
build and not install the daemon; you can then run it with a command
like

  # ./rsync-patched/rsync --daemon --port 8129 

Thanks, 
-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
[EMAIL PROTECTED], http://www.linuxcare.com/
Linuxcare. Support for the revolution.




Index: .cvsignore
===
RCS file: /data/cvs//rsync/.cvsignore,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- .cvsignore  1997/12/16 09:14:18 1.13
+++ .cvsignore  2000/10/13 03:28:12 1.14
@@ -1,5 +1,7 @@
-.ignore
+
 .cvsignore
+.ignore
+ID
 Makefile
 a
 b
@@ -18,4 +20,3 @@
 tech_report.log
 tech_report.ps
 test
-
Index: README
===
RCS file: /data/cvs//rsync/README,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- README  2000/09/06 02:39:45 1.24
+++ README  2000/11/02 11:38:13 1.25
@@ -90,11 +90,14 @@
 SETUP
 -
 
-Rsync uses rsh or ssh for communication. It does not need to be setuid
-and requires no special privileges for installation. It does not
-require a inetd entry or a daemon. You must, however, have a working
-rsh or ssh system. Using ssh is recommended for its security
-features. 
+Rsync normally uses rsh or ssh for communication.  It does not need to
+be setuid and requires no special privileges for installation.  You
+must, however, have a working rsh or ssh system. Using ssh is
+recommended for its security features.
+
+Alternatively, rsync can run in `daemon' mode, listening on a socket.
+This is generally used for public file distribution, although
+authentication and access control are available.
 
 To install rsync, first run the "configure" script. This will create a
 Makefile and config.h appropriate for your system. Then type
@@ -152,19 +155,20 @@
 source code repository then you can use anonymous cvs. You will need a
 recent version of cvs then use the following commands:
 
-   cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot login
+   cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot login
Password: cvs
 
-   cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot co rsync
+   cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot co rsync
 
-Look at the cvs documentation for more details.
+Look at the cvs documentation, or http://samba.org/cvs.html, for more
+details.
 
 
 COPYRIGHT
 -
 
 Rsync was written by Andrew Tridgell and Paul Mackerras, and is
-available under the Gnu Public License.
+available under the GNU General Public License.
 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
Index: authenticate.c
===
RCS file: /data/cvs//rsync/authenticate.c,v
retrieving revision 1.14
retrieving revision 1.16
diff -u -r1.14 -r1.16
--- authenticate.c  2000/08/19 15:25:05 1.14
+++ authenticate.c  2000/10/26 07:31:29 1.16
@@ -1,6 +1,7 @@
-/* 
-   Copyright (C) Andrew Tridgell 1998
+/* -*- c-file-style: "linux"; -*-

+   Copyright (C) 1998-2000 by Andrew Tridgell 
+   
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -85,7 +86,7 @@
if (fd == -1) return 0;
 
if (do_stat(fname, st) == -1) {
-   rprintf(FERROR,"stat(%s) : %s\n", fname, strerror(errno));
+   rsyserr(FERROR, errno, "stat(%s)", fname);
ok = 0;
} else if (lp_strict_modes(module)) {
if ((st.st_mode  06) != 0) {
@@ -144,13 +145,13 @@
if (!filename) return NULL;
 
if ( (fd=open(filename,O_RDONLY)) == -1) {
-   rprintf(FERROR,"could not open password file \"%s\"\n",filename);
+   rsyserr(FERROR, errno, "could not open password file \"%s\"",filename);
if (envpw) rprintf(FERROR,"falling back to RSYNC_PASSWORD environment 
variable.\n");
return NULL;
}


Single template for multiple directories.

2000-11-08 Thread Matt Sabourin

I am running rsync2.4.6 on Solaris 2.6 (solaris) and HP-UX11 (clients).
I need to use a "template" directory on the server to set up multiple
directories on the clients.  Basically, I'm trying to reset the user
directories to an initial image (this is for a training room).

The set is as follows:
- client machine name is hostXX, where XX is a 2 digit number
- user directories are under /u
- there are multiple users, with names in the format of nameXX, personXX,
etc, etc.
- the template directory lives on the server in /Master/template.  

I want rsync to remove any directories in /u that are not user directories
specifically tied to that machine (ie /u/name05 is not valid on host01).
I want rsync to set all valid user directories to match the template
directory on the server.  It looks like I will have to do an rsh from
the server to reset the permissions on the home directories after the
rsync has completed.

The rsync is being run on the server, inside of a for loop:
for I in 01 02 03 ...

Right now, I have created multiple templates on the server, one per
client.  This takes care of the permissions problem, and ensures that the
/u directory does not contain extra files/directories.  The problem is
maintaining the templates on the server becomes difficult.  

Does anyone have *any* suggestions for me?




==
Matt Sabourin   
Systems Engineer
Structural Dynamics Research Corp.  
1555 Fairlane Dr., Suite 300Email: [EMAIL PROTECTED]
Allen Park, MI 48101
==





RE: transfer interrupted, and Not privileged errors,

2000-11-08 Thread Todd Robinson

 That's pretty strange, for two reasons: as far as I knew, everything
 ought to go to stderr, stdout, or the log file.  When you say
 "console", do you mean it comes out in your current window, or it goes
 to the actual VGA adapter/serial console of the server?

In the current window the rsync was executed from, even if you redirect
stderr someplace else.  For instance, I run something just like this:

  rsync -avvvz /tmp/rsync-2.4.6/lib fdops3::marktg 21  /rsync.txt

(indicating a different source directory to affect a backup) in a cron job
wrapped in an exec.  I get the usual stuff in the log, but the 'unlink'
messages come to me in an e-mail from cron saying this is the output of my
job.

 Oh... and the second reason it's strange is that rsync is deleting
 anything at all.  Todd, would you mind please

 1. running with just the -r (recursive) flag, not -a (archive)

Ok, did:

 rsync -r /tmp/rsync-2.4.6/lib fdops3::marktg 21  /rsync.txt

got:
 unlink lib : Not privileged
 unlink lib : Not privileged
in the same window following the above command, /rsync.txt was empty (len
0), the server log file shows it received all the files in the lib
directory,

 2. confirming that when copying the rsync source, the error occurs
 even if the source directory is empty

 cd /tmp/rsync-2.4.6/lib
 rm *
 cd /
 rsync -r /tmp/rsync-2.4.6/lib fdops3::marktg 21  /rsync.txt

got:
 unlink lib : Not privileged
 unlink lib : Not privileged
in the same window following the above command, /rsync.txt was empty (len
0),
the server log shows no files transferred

 3. Applying the attached patch (or equivalently building from CVS);
 this will produce better explanations of where the error occurs.  If
 you're concerned about disrupting the machines then it's OK to just
 build and not install the daemon; you can then run it with a command
 like

  # ./rsync-patched/rsync --daemon --port 8129

Applied the patch and re-built, part way through the make I got these
errors:

 UX:acomp: WARNING: "socket.c", line 221: argument is incompatible with
prototype: arg #5
 UX:acomp: WARNING: "socket.c", line 264: argument is incompatible with
prototype: arg #3
 UX:acomp: WARNING: "socket.c", line 441: argument is incompatible with
prototype: arg #3
 UX:acomp: WARNING: "socket.c", line 470: argument is incompatible with
prototype: arg #3

installed Ok. kill and restart daemon. (note: all this is done on the server
side, not the client)

from the client side: (reload the rsync tar so there is stuff in lib now)

 rsync -r /tmp/rsync-2.4.6/lib fdops3::marktg 21  /rsync.txt

I get the following immediately after the command:

 recv_generator: unlink lib: Not privileged
 recv_generator: unlink lib: Not privileged

nothing in /rsync.txt, server log lists all files transferred, then 'wrote
32 read 72750 size 72169' and 'transfer interrupted (code 102) at
main.c(433)'


Thanks,

Todd





Re: Single template for multiple directories.

2000-11-08 Thread Ronan KERYELL

 On Wed, 8 Nov 2000 09:02:17 -0500 (EST), Matt Sabourin [EMAIL PROTECTED] 
said:

Matt Right now, I have created multiple templates on the server, one
Matt per client.  This takes care of the permissions problem, and
Matt ensures that the /u directory does not contain extra
Matt files/directories.  The problem is maintaining the templates on
Matt the server becomes difficult.

Why not using a less centralistic approach, such as with cfengine
(http://www.iu.hioslo.no/cfengine/) where you could state declaratively a
description of all your machines ?

-- 
Ronan KERYELL  |\/
Labo Informatique Télécom  |/)  Tel:(+33|0) 2.29.00.14.15
ENST Bretagne, BP832   KFax:(+33|0) 2.29.00.12.82
29285 BREST CEDEX  |\   E-mail: [EMAIL PROTECTED]
FRANCE | \  http://www-info.enst-bretagne.fr/~keryell




Some configuration help needed.

2000-11-08 Thread Tyler Hardison

Hi everyone, I have been using rsync now for about 2 months on my companies'
two job servers with great success.  Twice when our main jobserver has gone
down, our second "mirrored" server has picked up the ball and ran with it.

However something happened last night that was very (funny to me)
interesting. The #2 Controller on our Andataco raid cabinet died, so instead
of calling me or my other sysadmin partner our GM decided to reboot server 1
on his own.  What ended up happening was several raid volumes did not mount
because of a controller fault, otherwise the server came up fine including
rsync (not rsync's fault at all). As most of you can already guess, server 2
came calling and got empty volumes, esentially wiping server 2 out. :)

Now my question is, does anyone have a suggestion of a test that I can run
prior to rsync (which is run through a crontab) that I can use to stop
rsync? The server actually wasn't rebooted for about two hours so at one
point it was "down". Basically we sync the servers once an hour because we
do high volume graphics editing on very critical time schedules.

Thanks,

Tyler.





Re: Some configuration help needed.

2000-11-08 Thread Dietmar Goldbeck

On Wed, Nov 08, 2000 at 09:48:13AM -0800, Tyler Hardison wrote:
 
 Now my question is, does anyone have a suggestion of a test that I can run
 prior to rsync (which is run through a crontab) that I can use to stop
 rsync? The server actually wasn't rebooted for about two hours so at one
 point it was "down". Basically we sync the servers once an hour because we
 do high volume graphics editing on very critical time schedules.
 

You can use the --backup-dir option of rsync. It doesnt prevent the total 
move of your files, but it is a lot better to have all files
moved to /backup/2000-11-08 e.g. then to /dev/null.
This saves you even in case of accidential deletion or ILOVEYOU mails.

There are exaples under 
http://rsync.samba.org/rsync/examples.html

   Ciao
   Dietmar
-- 
 Alles Gute / best wishes  
 Dietmar GoldbeckE-Mail: [EMAIL PROTECTED]
Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western
Civilization?  Gandhi: I think it would be a good idea.




Re: transfer interrupted, and Not privileged errors,

2000-11-08 Thread Martin Pool

On  8 Nov 2000, Todd Robinson [EMAIL PROTECTED] wrote:
  That's pretty strange, for two reasons: as far as I knew, everything
  ought to go to stderr, stdout, or the log file.  When you say
  "console", do you mean it comes out in your current window, or it goes
  to the actual VGA adapter/serial console of the server?
 
 In the current window the rsync was executed from, even if you redirect
 stderr someplace else.  For instance, I run something just like this:
 
   rsync -avvvz /tmp/rsync-2.4.6/lib fdops3::marktg 21 
/rsync.txt

Ah, OK.  This is because stderr is not actually redirected!

The construct 21 means ``send fd2 (stderr) to wherever fd1 (stdout)
is pointing *at the moment*''.  Since redirections are evaluated in
order left-to-right, this sends stderr to the terminal (probably where
it was already going), and then sends stdout to the file.  From the
bash man page:

   Note that the order of redirections is  significant.   For
   example, the command

  ls  dirlist 21

   directs  both  standard  output  and standard error to the
   file dirlist, while the command

  ls 21  dirlist

   directs only the standard output to file dirlist,  because
   the  standard  error  was  duplicated  as  standard output
   before the standard output was redirected to dirlist.

I still remember the `ah-ha!' moment when this sunk in a few years
ago.

Regards,
-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
[EMAIL PROTECTED], http://www.linuxcare.com/
Linuxcare. Support for the revolution.

 PGP signature