Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Permission Denied on certain file types/sizes

Help
jhurd
2008-09-15
2013-04-16
  • jhurd
    jhurd
    2008-09-15

    Sorry if this question doesn't fall under this forum.

    But I'm having a problem accessing certain file types/sizes when using webdav and davfs. Using the latest webdav on a unbutu live cd.

    I'm able to mount the webdav share, and I'm able to cat and edit certain files, but other files I get permissions denied. On the webserver they all have the same permissions so I'm at a bit of a loss here.

    Do I need to mount in a different way, or edit my mod_dav.conf to include some other entry?

    mounting by:
    mount -t davfs http://10.2.0.1/windows /mnt/test -o rw

    Thanks.

     
    • jhurd
      jhurd
      2008-09-15

      Ok I tracked down the apache log file and found this when I try to touch files.

      [Mon Sep 15 09:53:56 2008] [error] [client 10.2.4.61] File does not exist: /home/share/htdocs/windows/3/.sda-pt.sf.swp
      [Mon Sep 15 09:53:56 2008] [error] [client 10.2.4.61] Could not save .locknull file.  [500, #0]
      [Mon Sep 15 09:53:56 2008] [error] [client 10.2.4.61] (2)No such file or directory: Error opening /home/share/htdocs/windows/3/.DAV/.locknull for writing  [500, #0]
      [Mon Sep 15 09:53:56 2008] [error] [client 10.2.4.61] File does not exist: /home/share/htdocs/windows/3/.sda-pt.sf.swp
      [Mon Sep 15 09:53:56 2008] [error] [client 10.2.4.61] Could not LOCK /windows/3/.sda-pt.sf.swp due to a failed precondition (e.g. other locks).  [423, #0]
      [Mon Sep 15 09:53:56 2008] [error] [client 10.2.4.61] (2)No such file or directory: Existing lock(s) on the requested resource prevent an exclusive lock.  [423, #0]
      [Mon Sep 15 10:15:38 2008] [error] [client 10.2.4.61] Unable to PUT new contents for /windows/3/sda-pt.sf.  [403, #0]
      [Mon Sep 15 10:15:38 2008] [error] [client 10.2.4.61] (13)Permission denied: An error occurred while opening a resource.  [500, #0]
      [Mon Sep 15 10:18:40 2008] [error] [client 10.2.4.61] File does not exist: /home/share/htdocs/windows/3/.sda-pt.sf.swp
      [Mon Sep 15 10:18:40 2008] [error] [client 10.2.4.61] Could not save .locknull file.  [500, #0]
      [Mon Sep 15 10:18:40 2008] [error] [client 10.2.4.61] (2)No such file or directory: Error opening /home/share/htdocs/windows/3/.DAV/.locknull for writing  [500, #0]
      [Mon Sep 15 10:18:40 2008] [error] [client 10.2.4.61] File does not exist: /home/share/htdocs/windows/3/.sda-pt.sf.swp
      [Mon Sep 15 10:18:40 2008] [error] [client 10.2.4.61] Could not LOCK /windows/3/.sda-pt.sf.swp due to a failed precondition (e.g. other locks).  [423, #0]
      [Mon Sep 15 10:18:40 2008] [error] [client 10.2.4.61] (2)No such file or directory: Existing lock(s) on the requested resource prevent an exclusive lock.  [423, #0]

      and this is my mod_dav config file:
      DAVLockDB /home/var/apache/dav/lockdb/DAVLock
      DAVMinTimeout 600
      <Location /windows>
          AllowOverride None
          Options None
          Order allow,deny
          Allow from all
          DAV On
      </Location>

       
    • Steven Shiau
      Steven Shiau
      2008-09-16

      My coworker Louie Chen did some tests here, and it looks like the davfs2 from Ubuntu 8.10 is unstable, too.

      So I think we have to wait for the next davfs2. Maybe it will be better in the future.

      BTW, did you file a bug report in davfs2 project ?

       
    • Werner Baumann
      Werner Baumann
      2008-09-16

      Apache's error-log shows that apache could not open some files for writing. Looks like a problem with file permissions.

      Please note: All files and all directories in your dav-document-tree must be readable and writable by the apache-process (might also run as httpd). Additionally it must have execute permission for all direcoties as well as read/write-permission for the LockDB.

      If you can edit some files and can't edit others, there *must* be a difference. If you can't find the difference you should post me all information about these files (at least 'ls -al'). There also seem to be some stale locks. No idea how you could create them. You probably have to remove them manually.

      Apache should have an acces.log too. It lists all requests from davfs2 and the HTTP-return-code. It could be useful for debugging.

      Cheers
      Werner

      steven_shiau wrote:
      "My coworker Louie Chen did some tests here, and it looks like the davfs2 from Ubuntu 8.10 is unstable, too. "
      "So I think we have to wait for the next davfs2. Maybe it will be better in the future."

      Hello Steven.
      Are you sure this is the right thread?
      Anyway:
      Where is your bug-report? Unreported bugs can't be fixed. No use in waiting.
      "my coworker thinks davfs2 is unstable" isn't very helpful too.

      Some hints concerning Debian-Packages:
      Lenny uses a newer version of the Debian packaging and maintainer tools. If you want to backport to Etch, you will have to manually fix dependencies and additionally fix some of the files in the debian-directory to work with the older tools in Etch.
      It might be easier to take the Etch-package and update the davfs2-sources.
      More information at http://www.de.debian.org/doc/maint-guide/

       
      • Steven Shiau
        Steven Shiau
        2008-09-17

        Werner,
        We did more tests both on Lenny and Intrepid. When saving a partition, it showed the wevdav server has no disk space (actually it does have), and we found there is a file /var/www/html/webdav/DISK_FULL. Therefore maybe the problem is in the apache configuration, not davfs2.
        Trying to dig more.

         
    • Werner Baumann
      Werner Baumann
      2008-09-17

      I suggest to use the debug options of davfs2. In many cases you can easily see what is really going on between the client and the server. And of course you should do this before posting statements about who is the culprit.
      But if you find a bug in davfs2 a bug report would be much welcomed.

      Cheers
      Werner

       
      • Steven Shiau
        Steven Shiau
        2008-09-18

        Werner,
        Thanks for your suggestions.
        Here we found davfs will try to cache the file in /var/cache/davfs2/ in local machine. Since the live CD uses RAM as disk, the space /var/cache/davfs2 is full very soon, because the image is quite large compared with the RAM size. Try to set the cache size as 0, but it did not work. davfs2 still cached the file. Will set a very small cache size limit and to see it works or not.
        Maybe it's a good idea that devfs2 can detect the free space of /var/cache/davfs2 and set a maximum number, like 30%, 50% before caching.

         
    • Steven Shiau
      Steven Shiau
      2008-09-18

      Werner,
      BTW, I apologize that I should give more tests and find more info before posting a vague messages.
      Thanks again.

       
    • Werner Baumann
      Werner Baumann
      2008-09-18

      Hello Steven,

      davfs2 will always need to locally cache at least all open files in full. This will not change in the future.

      If you want to extend the available storage because you have not enough local storage, davfs2 is definitely the wrong choice. It is not intended for this. davfs2 is just for what WebDAV originally meant: distributed authoring. Its intention is to make WebDAV-resources available for applications without built-in support for WebDAV. Though many people now believe that WebDAV is for anything else but for this originally intended use, davfs2 is just for this.

      Concerning the location of the cache directory, you should really read the documentation:
      README, 'man dafvs2.con', 'man mount.davfs' and 'man umount.davfs'.

      Cheers
      Werner

       
      • Steven Shiau
        Steven Shiau
        2008-09-19

        Werner,
        Thanks for your info, now we know we are not in the the right direction in the beginning.
        Thanks again. Appreciate that.

        Steven.