maindavfs2 - Support: sr #108685, content within a "rx"...

 
 

sr #108685: content within a "rx" directory that resides in a "x" only directory is not accessible

Submitter:  Knuth Posern <posern>
Submitted:  Sat 15 Nov 2014 12:35:34 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  _71007
Open/Closed:  Closed Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 18 Nov 2014 01:43:14 PM UTC, comment #5: 

Ok cool!

(a)
I just got word, that they changed the implementation so that
   ls  folder
will contain / show "subfolder".

(b)
Thanks a lot for your suggestion to include /folder/subfolder directly in the URL !.... I wasn't actually aware that this is possible ... but makes sense :)
And it works !

So I guess one can close this as "won't fix" ?

Knuth

Knuth Posern <posern>
Mon 17 Nov 2014 07:33:54 PM UTC, comment #4: 

When you are allowed to access <URL>/folder/subfolder it should be possible to directly mount <URL>/folder/subfolder to another mount point (unless your service provider does something real funny). You would have two file systems: <URL> at moint point a and <URL>/folder/subfolder at mount point b.

As I understzand the WebDAV server indeed reports that <URL>/folder is empty. For davfs2, that builds the file system tree locally for beeing able to cache files and meta data, it would be difficult to treat a directory as empty and not empty at the same time (it would be different if davfs2 would not cache information but just forward file system calls as HTTP requests).

Werner

- <_71007>
Mon 17 Nov 2014 05:55:41 PM UTC, comment #3: 

Hi again,

Another precision :

With wdfs
wget http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz

it is also possible to access:

ls /mnt/webdav/folder/sub-folder/

even though

ls /mnt/webdav/folder

is empty.

Knuth

Knuth Posern <posern>
Mon 17 Nov 2014 11:13:02 AM UTC, comment #2: 


Thanks a lot for your answer!!

I am sorry, I was not clear and have to clarify:

I had thought about wrapping the bugs tile in quotes, because
this was just to summarize the issue I am having / seeing, but does not mean, that the situation on the server is like this.

I am a user of a public webDAV service here in France.
So I don't know a lot of the server side (except what I can see through the clients).

As far as I know the webDAV accessible content is stored in a DB (a support clerk told me), not on the file-system, the file-system was just a metaphor.

I already assumed that it will boil down to the question if this sort of setup of a webDAV share is "illegal" in the sense of WebDAV, because non standard conform or not.

So the situation is :

   * there is a directory "folder/sub-folder"
   * "folder" is accessible via davfs2 (and cadaver) but empty
   * folder/sub-folder is accessible and not empty

   * I am currently in a group that allows me access to "folder/sub-folder".

   * To be able to get the content-listing of "folder" they told me that I would need to be in the super-admin group, which would automatically grant me access to EVERYTHING, which is unlikely going to happen.

Knuth

Knuth Posern <posern>
Sun 16 Nov 2014 12:11:25 PM UTC, comment #1: 

I don't think it's a bug. It is a restriction due to the fact that WebDAV is not a network file system. There is also a misunderstanding about file permissions and davfs2.

WebDAV:
You seem to change file permissions of the repository of your WebDAV module on the server side and expect that this is reflected in the local file permissions of your davfs2 client. This can't work.
While your WebDAV module stores its resources in a file system with Unix permissions, this is not generally the case. It could be any kind of file system, a data base or whatsoever. The basic WebDAV protocol (RFC 4316) does not know anything about file permissions, let alone Unix file permissions. davfs2 can only deal with what is transferred via the WebDAV protocol. Unix file permissions are a completely local property.

To get a listing of WebDAV resources within a WebDAV collection (files in a directory) davfs2 uses the PROPFIND method with DEPTH 1. According to RFC 4316 the server MUST include a listing of all resources in this collection within the response. What is not listed there does not exist (from a WebDAV point of view).

When you set file permissions of your repository as you reported, this will prevent your WebDAV module from reading the directory. Therefore it can't report its content to the client. davfs2 rightfully assumes that there are no files in this directory.

davfs2 and cadaver:
Of course could davfs2 send a GET request for a resource that according to the response on PROPFIND does not exist. But this would create a lot of additional complexity and I can't see the benefit of it.
cadaver is not a file system but has a FTP-like interface. In your case it can simply forward your request for any URL because it has no need to care about the consistency of a file system.

Access permission.
You should not try to control access permissions of clients by setting file permissions of the repository of your WebDAV back end on the server side. If you want to control access by clients you should do it with the means of WebDAV. For basic WebDAV I can't see anything in the protocol that would allow for the access restrictions you try.

There is an extension for WebDAV that implements ACLs (RFC3744). But it introduces a lot of new complexity for the client software as well as for the administration. I have no intention to implement this extension.

Werner

- <_71007>
Sat 15 Nov 2014 12:35:34 PM UTC, original submission:  

Dear DavFS2 Maintainer,

In short, my situation is like if you do:
mkdir -p folder/sub-folder
chmod 111 folder
chmod 555 folder/sub-folder

So you can NOT do:
ls folder/
BUT you can do:
ls folder/sub-folder/


But via WebDAV: I have access to the directory and (all of) its content
folder/sub-folder/
But I cannot READ the directory:
folder/


And this seems to be a client problem, because with cadaver, I can
access "folder/sub-folder/"!

((((
if I try to cd into "folder/" I get:
cadaver https://ssl.domain.org
Authentication required for Zope on server `ssl.astride.fr':
Username: ...
Password:
dav:/> cd folder
Authentication required for Zope on server `ssl.astride.fr':
Username: ...
Password: ...
Authentication required for Zope on server `ssl.astride.fr':
Username: ^CTerminated by signal 2.
))))

((((
but if I directly cd into "folder/sub-folder" it works:

cadaver https://ssl.domain.org
Authentication required for Zope on server `ssl.astride.fr':
Username: ...
Password:
dav:/> cd folder/sub-folder
dav:/folder/sub-folder/> ls
Listing collection `/folder/sub-folder/': succeeded.
Coll:   comite-de-suivi                        1  Nov 12 20:45
dav:/folder/sub-folder/> ^CTerminated by signal 2.
))))

Is this fixable within davfs2 ?


Thanks a lot in advance for any feedback !


Knuth

Knuth Posern <posern>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by posern (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-15 _71007 Open/ClosedOpen Closed
    2016-04-15 _71007 StatusIn Progress Done
    2014-11-16 _71007 StatusNone In Progress
        Assigned toNone _71007
    2014-11-15 posern Carbon-CopyRemoved -email is unavailable- -
    2014-11-15 posern Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code