Deleted zero byte file keep showing up.

Help
butchie55
2006-09-28
2013-04-16
  • butchie55
    butchie55
    2006-09-28

    Hello Werner,

    Continuing some testing here.
    Trying to copy a folder I got an error message (could not copy a specific file). When I checked, the file was empty (emptied probably by a prior copy, so I got the file back from a backup, though I couldn't replace the empty file having the same name. With a new name, no problem.

    fb@nuxdev ~/mnt/clients/Paris IDF/78 Yvelines/41105070 Tournelle 78 Septeuil/GRAPH/PARIS 5
    3 $ ls -la
    total 269
    drwxr-xr-x 2 fb   users   4096 sep 28 12:13 .
    drwxr-xr-x 3 fb   users   4096 sep  6 10:37 ..
    -rwxrwxrwx 1 fb   users  52254 sep 28 11:58 Logo.jpg
    -rwxrwxrwx 1 fb   users 106849 sep 28 11:58 TournelleHiver.jpg
    -rwxrwxrwx 1 root root  107473 sep 28 12:13 vue aérienne3b.jpg
    -rw-r--r-- 1 fb   users      0 jan  1  1970 vue aérienne3.jpg

    So I went to delete the file :

    fb@nuxdev ~/mnt/clients/Paris IDF/78 Yvelines/41105070 Tournelle 78 Septeuil/GRAPH/PARIS 5
    3 $ rm vue\ aérienne3.jpg
    fb@nuxdev ~/mnt/clients/Paris IDF/78 Yvelines/41105070 Tournelle 78 Septeuil/GRAPH/PARIS 5
    3 $ ls -la
    total 269
    drwxr-xr-x 2 fb   users   4096 sep 28 12:23 .
    drwxr-xr-x 3 fb   users   4096 sep  6 10:37 ..
    -rwxrwxrwx 1 fb   users  52254 sep 28 11:58 Logo.jpg
    -rwxrwxrwx 1 fb   users 106849 sep 28 11:58 TournelleHiver.jpg
    -rwxrwxrwx 1 root root  107473 sep 28 12:13 vue aérienne3b.jpg
    fb@nuxdev

    then I did a refresh in konqueror then again ls -la and got the empty file back !

    fb@nuxdev ~/mnt/clients/Paris IDF/78 Yvelines/41105070 Tournelle 78 Septeuil/GRAPH/PARIS 5
    3 $ ls -la
    total 269
    drwxr-xr-x 2 fb   users   4096 sep 28 12:23 .
    drwxr-xr-x 3 fb   users   4096 sep  6 10:37 ..
    -rwxrwxrwx 1 fb   users  52254 sep 28 11:58 Logo.jpg
    -rwxrwxrwx 1 fb   users 106849 sep 28 11:58 TournelleHiver.jpg
    -rwxrwxrwx 1 root root  107473 sep 28 12:13 vue aérienne3b.jpg
    -rw-r--r-- 1 fb   users      0 jan  1  1970 vue aérienne3.jpg
    fb@nuxdev

    stat vue\ aérienne3.jpg
      File: `vue aérienne3.jpg'
      Size: 0               Blocks: 0          IO Block: 4096   fichier régulier vide
    Device: 12h/18d Inode: 1176640152  Links: 1
    Access: (0644/-rw-r--r--)  Uid: ( 1000/      fb)   Gid: (  100/   users)
    Access: 2006-09-28 12:27:20.000000000 +0000
    Modify: 1970-01-01 00:00:00.000000000 +0000
    Change: 1970-01-01 00:00:00.000000000 +0000

    I guess it is a bug.

    Yours,
    Butchie

     
    • butchie55
      butchie55
      2006-09-28

      Oups,
      Maybe not a bug of davfs :
      I cannot delete 0 byte files from a regular webdab file manager neither.
      Yours,
      Butchie

       
    • Werner Baumann
      Werner Baumann
      2006-10-03

      Hello Butchie,

      files with size zero and a date of 1970-01-01 are not allways a bug. They represent locks on the server with no file uploaded. This is valid in WebDAV as clients may protect the name before they start editing the file.

      But there is a problem, when locks are not released properly (on existing files as well as on nonexisting files). This may allways happen in a networked application. Best would be, if the servers implements some means, to release locks after some time.

      Deleting 0 byte files:
      It may be impossible, except for the administrator of the server. But if the lock is from davfs2, you may try to copy some file to this byte 0 file and then delete it. It did not try it, but davfs2 might be able to use the lock in this case.

      I have done a new release. Besides some improvements it also tries to fix all the bugs you reported. Would be nice if you could try it.

      Greetings
      Werner

       
    • butchie55
      butchie55
      2006-10-04

      Thanks for the data on 0byte files representing locks ...

      Anyway I will install your new version of davfs2 as soon as possible, and let you know how it goes.

      Yours,
      Butchie