directories not correctly recognized rsync-3.0.4

Jan Thielmann jan_thielmann at gmx.de
Tue Sep 9 15:59:51 GMT 2008


Thanks for the quick reply!

In fact, the mode is beeing truncated. The fprintf yields the following:

0100000755      (the directory)
0300000755      (a regular file)

So, it seems that my system is not compliant to the values that rsync expects. 
In fact, my system is a mainframe running Unix System Services, but this system is compliant 
to POSIX.  
Previously I was running rsync-2.6.9 on that system and it was working well. 

Thanks!
Jan

-------- Original-Nachricht --------
> Datum: Tue, 9 Sep 2008 06:49:38 -0700
> Von: Wayne Davison <wayned at samba.org>
> An: Jan Thielmann <jan_thielmann at gmx.de>
> CC: rsync at lists.samba.org
> Betreff: Re: directories not correctly recognized rsync-3.0.4

> On Tue, Sep 09, 2008 at 01:08:57PM +0200, Jan Thielmann wrote:
> > #[sender] i=0 /u/prak28 dir1 mode=0755 len=288 uid=3007030 gid=0 flags=5
> 
> That mode is totally bogus.  For dir1 to be a dir, it should have mode
> 040775.  If it were a regular file, it should have mode 010775.  So, you
> should investigate if stat() is returning just 0755 in st_mode, or if
> the value is unusually large (and thus, truncated).  One way to get an
> inkling should be to run:
> 
> perl -e 'printf "0%o\n", (stat("dir1"))[2]'
> 
> However, to really know what rsync is getting, you'd be better of either
> running rsync under a debugger, or adding an fprintf() into link_stat():
> 
> --- flist.c
> +++ flist.c
> @@ -224,6 +224,7 @@ int link_stat(const char *path, STRUCT_STAT *stp, int
> follow_dirlinks)
>  		return x_stat(path, stp, NULL);
>  	if (x_lstat(path, stp, NULL) < 0)
>  		return -1;
> +	fprintf(stderr, "0%o\t%s\n", stp->st_mode, path); 
>  	if (follow_dirlinks && S_ISLNK(stp->st_mode)) {
>  		STRUCT_STAT st;
>  		if (x_stat(path, &st, NULL) == 0 && S_ISDIR(st.st_mode))
> 
> ..wayne..

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


More information about the rsync mailing list