cannot create .hosts.b0WX1x : File exists

Dave Dykstra dwd at bell-labs.com
Fri Nov 30 01:17:03 EST 2001


What version of rsync are you using?  The "cannot create" message is coming
from receiver.c.  Assuming you're using a released version of rsync and not
a development version, it appears that the mktemp library call is creating
the file and rsync isn't expecting that.  Are you sure the Linuxes are
exactly the same; do you perhaps have a different version of libc on that
one machine (I'm guessing that maybe mktemp has been changed to create the
file instead of just returning its name)?  Andrew Tridgell changed the
relevant section of code in the development version of rsync 6 months ago
to use mkstemp (when configure determines it to be secure) instead of
mktemp but he didn't say why.

- Dave Dykstra

On Thu, Nov 29, 2001 at 12:34:04AM +0100, Rok Krulec wrote:
> Hello Dave,
> 
> thank You for Your time; sorry I didn't included my rsyncd.conf. As I
> said, on two other machines with EXACTLY the same config file and EXACTLY
> the same passwd entries for nobody and nogroup = same ID's, it works
> perfectly. EXECTLY the same permissions on target directory alos ofcourse.
> 
> This is my /etc/rsyncd.conf:
> 
> --- CUT HERE ---
> motd file = /etc/issue.net
> max connections = 0
> syslog facility = local3
> 
> [bkp]
>         comment = Backup area
>         path = /_silos
>         read only = no
>         list = no
>         uid = nobody
>         gid = nogroup
>         hosts allow = XXX.XXX.XXX.XXX
> --- CUT HERE ---
> 
> Portoroz/Slovenia, 29.Nov 2001 @ 00:24 CET
> Public GnuPG key @ http://rok.fpp.edu/pgp.key
> 
> 
> On Wed, 28 Nov 2001, Dave Dykstra wrote:
> > You probably need to set
> >     read only = no
> > in rsyncd.conf.
> > 
> > - Dave
> > 
> > On Wed, Nov 28, 2001 at 04:29:35PM +0100, Rok Krulec wrote:
> > > Hello,
> > > 
> > > when I do:
> > > /opt/rsync/bin/rsync /etc/hosts targethost::bkp/
> > > 
> > > I get:
> > > cannot create .hosts.b0WX1x : File exists
> > > 
> > > I check the targethost and I get empty file .hosts.b0WX1x
> > > 
> > > When trying with other targethost-s it works, but on this one it doesn't.
> > > On the other targethosts I have exactly the same LinuX distribution,
> > > permissions and users than on the problem targethost.
> > > I have exactly the same configuration than on the other machines, except
> > > on probelm targethost I have SCSI hard disk.
> > > 
> > > When i strace the rsync --deamon i get:
> > > 
> > > 4697  open(".hosts.b0WX1x", O_RDWR|O_CREAT|O_EXCL|0x8000, 0600) = 4
> > > 4697  open(".hosts.b0WX1x", O_WRONLY|O_CREAT|O_EXCL|0x8000, 0600) = -1 EEXIST (File exists)
> > > 
> > > It seems like it opens the file ReadWrite and then tries to open it
> > > readonly. I don't know why. It bangs then.
> > > 
> > > Thanks for any hint,
> > >    Rok Krulec
> 




More information about the rsync mailing list