Thank you for the information that you have passed on to me. My own
research has found that ftruncate is quite happy to set a file to the
same size that it is already, so something else must be causing the
problem. The comment before the ftruncate in set_share_mode says the
file is being truncated just for safety, so normally it is probably not
necessary to truncate the file.
Regards,
Tim
> Tim Boorman
> UNIX Systems Support
> Lusis Limited, Technology Drive, Bridgend Science Park, Bridgend,
> United Kingdom CF31 3UJ
> Extension: 44966
> Direct Line: +44 (0)1656 765966
> Mobile: +44 (0)468 647495
> Email: boorman.tim@lusis.com
>
>
> -----Original Message-----
> From: Wijnand Dijkstra [SMTP:W.M.Dijkstra@phys.tue.nl]
> Sent: 24 September 1997 20:21
> To: Boorman.Tim@Lusis.com
> Subject: Re: Samba 1.9.17 fails to truncate share mode file (fwd)
>
> > I've been watching the lock files, and over several days, the
files
> > generating this error have always been the "correct" size,
so I
> suspect
> > ftruncate may give a (misleading) error if you ask it to truncate a
> file
> > that is already the right length. I also got the error in another
> > function, so today I hacked locking.c to add a test for the length
> of the
> > file in 3 places.
> >
> > This seems to have stopped the ftruncate errors (after only an hour
> of
> > testing), so I'll pass it along in case you are interested in
trying
> it
> > out as well. I should work up a test for ftruncate to verify my
> > hypothesis before submitting a patch to the developers, but it may
> > take me a while to get around to that.
> >
> > --
> > George White <aa056@chebucto.ns.ca>
<WhiteG@mar.dfo-mpo.gc.ca>
> > Bedford Inst. of Oceanography, Nova Scotia, Canada. tel:
> 902.426.8509
> >
> > On Thu, 18 Sep 1997, Wijnand Dijkstra wrote:
> >
> > > I didn't got a respons, I still have the problem,
> > >
> > > Perhaps I have to repost my problem. Do you also have samba run
on
> a
> > > HP-UX system?
> > >
> > > With regards, Wijnand
> > >
> > > > I have a similar problem on a NeXT 3.0 system. It was
working
> fine with
> > > > samba 1.9.16p11, but 1.9.7 gives almost identical messages
as in
> your
> > > > posting:
> > > >
> > > > set_share_mode: failed to ftruncate sharemode file ... to
size
> nn
> > > > (Premision denied).
> > > >
> > > > I wondered if you found a solution after your post to the
Samba
> list,
> > > > which does
> > > > not seem to have elicited any responses.smb
> > >
> > > --
> > > Wijnand Dijkstra | Department of Physics
> > > | Eindhoven University of
> Technology
> > > Phone: +31 (0)40 2474108 | Den Dolech 2, P.O. Box 513
> > > email: W.M.Dijkstra@phys.tue.nl | 5600 MB Eindhoven, The
> Netherlands
> > >
>