← Back to team overview

kernel-packages team mailing list archive

[Bug 1477678] [NEW] cifs vers >1.0 issue deleting non-empty folder

 

Public bug reported:

Deleting a *non empty* folder on a cifs share won't work with cifs>1.0 as expected.
Deleting files and empty folders step by step works.
Tested in LXTerminal and PCManFM.

LXTerminal:
$ sudo mount //server/pw ~/cifs -t cifs -o "defaults,uid=us2000,gid=data,file_mode=0700,dir_mode=0700,credentials=/home/us2000/.smb/smbdata,vers=2.0"

$ mount
//server/pw on /home/us2000/cifs type cifs (rw,relatime,vers=2.0,sec=ntlmssp,cache=strict,username=smbdata,domain=K,uid=1000,forceuid,gid=1003,forcegid,addr=192.168.0.5,file_mode=0700,dir_mode=0700,nounix,serverino,rsize=65536,wsize=65536,actimeo=1)

$ mkdir -p ~/cifs/1/2
$ rmdir ~/cifs/1; echo $?
0
$ ls -la ~/cifs
drwx------ 2 us2000 data      0 Jul 23 18:38 .
drwxr-xr-x 1 us2000 us2000 1046 Jul 23 18:34 ..
drwx------ 2 us2000 data      0 Jul 23 18:37 1
$ rmdir ~/cifs/1/2
$ rmdir ~/cifs/1
$ ls -la ~/cifs
drwx------ 2 us2000 data      0 Jul 23 18:38 .
drwxr-xr-x 1 us2000 us2000 1046 Jul 23 18:34 ..


Deleting in GUI with PCManFM even strange:
the deleted folder is removed from listing in PCManFM on the first glance, but is after F5 again present.


Mounting with cifs vers 1.0 has no problem:
Deletion in PCManFM works fine, LXterminal gives on non-empty folder:
$ rmdir ~/cifs/1
rmdir: failed to remove ‘/home/us2000/cifs/1’: Directory not empty


Distributor ID:	Ubuntu
Description:	Ubuntu 15.04
Release:	15.04
Codename:	vivid
cifs-utils	2:6.0-1ubuntu2      amd64 
kernel		3.19.0-23-generic

** Affects: cifs-utils (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: linux (Ubuntu) => cifs-utils (Ubuntu)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1477678

Title:
  cifs vers >1.0 issue deleting non-empty folder

Status in cifs-utils package in Ubuntu:
  New

Bug description:
  Deleting a *non empty* folder on a cifs share won't work with cifs>1.0 as expected.
  Deleting files and empty folders step by step works.
  Tested in LXTerminal and PCManFM.

  LXTerminal:
  $ sudo mount //server/pw ~/cifs -t cifs -o "defaults,uid=us2000,gid=data,file_mode=0700,dir_mode=0700,credentials=/home/us2000/.smb/smbdata,vers=2.0"

  $ mount
  //server/pw on /home/us2000/cifs type cifs (rw,relatime,vers=2.0,sec=ntlmssp,cache=strict,username=smbdata,domain=K,uid=1000,forceuid,gid=1003,forcegid,addr=192.168.0.5,file_mode=0700,dir_mode=0700,nounix,serverino,rsize=65536,wsize=65536,actimeo=1)

  $ mkdir -p ~/cifs/1/2
  $ rmdir ~/cifs/1; echo $?
  0
  $ ls -la ~/cifs
  drwx------ 2 us2000 data      0 Jul 23 18:38 .
  drwxr-xr-x 1 us2000 us2000 1046 Jul 23 18:34 ..
  drwx------ 2 us2000 data      0 Jul 23 18:37 1
  $ rmdir ~/cifs/1/2
  $ rmdir ~/cifs/1
  $ ls -la ~/cifs
  drwx------ 2 us2000 data      0 Jul 23 18:38 .
  drwxr-xr-x 1 us2000 us2000 1046 Jul 23 18:34 ..

  
  Deleting in GUI with PCManFM even strange:
  the deleted folder is removed from listing in PCManFM on the first glance, but is after F5 again present.

  
  Mounting with cifs vers 1.0 has no problem:
  Deletion in PCManFM works fine, LXterminal gives on non-empty folder:
  $ rmdir ~/cifs/1
  rmdir: failed to remove ‘/home/us2000/cifs/1’: Directory not empty

  
  Distributor ID:	Ubuntu
  Description:	Ubuntu 15.04
  Release:	15.04
  Codename:	vivid
  cifs-utils	2:6.0-1ubuntu2      amd64 
  kernel		3.19.0-23-generic

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/1477678/+subscriptions