[linux-cifs-client] CIFS and rename of open files

Jeff Layton jlayton at redhat.com
Fri Jul 25 17:58:09 GMT 2008


On Fri, 25 Jul 2008 19:39:14 +0200
Wilhelm Meier <wilhelm.meier at fh-kl.de> wrote:

> Hello again,
> 
> here comes a minimal test program what does essentially the same as 
> kmail does:
> 
> open to files
> leave them open
> rename the first as the second -> permission denied on cifs
> 
> This works as expected on local fs like ext2/3, but not on a 
> cifs-share.
> 
> This is the version information:
> 
> Display Internal CIFS Data Structures for Debugging
> ---------------------------------------------------
> CIFS Version 1.52
> Active VFS Requests: 0
> Servers:
> 1) Name: 192.168.32.12  Domain: KMUX Mounts: 1 OS: Unix
>         NOS: Samba 3.0.24       Capability: 0x80f3fd
>         SMB session status: 1   TCP status: 1
>         Local Users To Server: 1 SecMode: 0x3 Req On Wire: 0
> MIDs:
> 
> Shares:
> 1) \\192.168.32.12\hugo.tester Uses: 1 Type: NTFS DevInfo: 0x0 
> Attributes: 0x2b
> PathComponentMax: 255 Status: 1 type: 0
> 
> I would be _very_ happy, I you can give me a solution to this 
> problem!!!
> 
> TIA,
> 
> Wilhelm
> 
> Am Montag, 30. Juni 2008 schrieb Jeff Layton:
> > On Wed, 25 Jun 2008 09:52:23 +0200
> >
> > Wilhelm Meier <wilhelm.meier at fh-kl.de> wrote:
> > > Hello Jeff,
> > >
> > > Am Freitag, 6. Juni 2008 schrieb Wilhelm Meier:
> > > > Am Freitag, 6. Juni 2008 schrieb Jeff Layton:
> > > > > On Fri, 6 Jun 2008 10:49:26 +0200
> > > > >
> > > > > Wilhelm Meier <wilhelm.meier at fh-kl.de> wrote:
> > > > > > Hello,
> > > > > >
> > > > > > are there any news to the issue of renaming open files -
> > > > > > because this missing feature is preventing the use of cifs
> > > > > > as user homes on linux systems.
> > > > >
> > > > > I was looking at the problem earlier this week, but haven't
> > > > > gotten all the way to a solution. The issue is very dependent
> > > > > on server behavior, with windows servers being particularly
> > > > > problematic. I've been doing some experimentation, but
> > > > > haven't found a solution that seems to work well for all
> > > > > cases.
> > >
> > > is there any progess or activity from your side? I'm asking
> > > because this is a show-stopper using cifs-homes for users with
> > > newer kmail-versions.
> > > Or do you know any workaround in this respect?
> >
> > I'm afraid that I've been sidetracked into other things and haven't
> > had time to touch this. The problem is (I think) that CIFS
> > currently tries to set the DELETE_ON_CLOSE bit using the create
> > flags in the open call, but this only works if the file is actually
> > being created. So we need to set the bit with a SET_FILE_INFO call
> > and then try to rename it.
> >
> > I'm probably wrong on some of this though, this turns out to be a
> > rather tricky situation to handle correctly, and it will probably
> > take some experimentation to get it right. I don't know of any
> > workarounds for this at the moment...
> >
> > > > Sorry for being unclear here: I mean linux-cifs in combination
> > > > with samba-server
> 
> 
> 

Thanks Wilhelm,
  It may be a little while. I have some fairly time consuming CIFS and
NFS work on my plate at the moment, but I'll try to have a look at this
once some of that is done. The reproducer should be very helpful.

Cheers,
-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list