bugdavfs2 - Bugs: bug #59548, davfs2 cache folder very long name...

 
 

bug #59548: davfs2 cache folder very long name exceeded 255 chars

Submitter:  None
Submitted:  Thu 26 Nov 2020 09:01:41 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Duplicate
Privacy:  Public Assigned to:  _71007
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Nov 2020 07:16:55 AM UTC, comment #2: 

comment #1:
Thank you for your reply.

> * the file name must be meaningfull for humans (what mount is this cache directory for?)

Don't understand why cache files should be "meaningful for humans"? Do you expect the user to go to the cache folder to examine files?

And all other points could be reached with a short hash from this long folder name.

> This results in concatenating resource name, name of the mountpoint and name of the mounting user. If one of these components is missing then duplicates are possible.
> Why don't you use /home/jleman/ plus a hash code of 5 characters?

As mounting folder is accessible by the user and the user is using it to work with files it should be meaningful, as opposed to the cache folder, where only davfs goes.
 

> If the name of your mountpoint really requires to include
> * two times the user name (jleman)
> * three instances of "webdav"

You are right, it's not ideal, just an example. In general, it could be a very long mounting url.

Could you clarify what is the mounting url length limit for davfs on Ubuntu?

Anonymous
Thu 26 Nov 2020 04:49:20 PM UTC, comment #1: 

This is a duplicate of sr #109941.

The "very strange way" results from this requirements:

  • the file name must be unique
  • the file name must be meaningfull for humans (what mount is this cache directory for?)
  • it must be easy to automatically create the file name.


This results in concatenating resource name, name of the mountpoint and name of the mounting user. If one of these components is missing then duplicates are possible.

While talking about strange names:
Isn't "/home/jleman/.tmp/webdav/webdavhttps:__gofast.ceo-vision.com:443_TICKET_XXXREMOVEDFORDEBUGXXXe_alfresco_webdav_Sites__jlemangarin_" quite a little bit a strange name for a mountpoint? Why don't you use /home/jleman/ plus an hash code of 5 characters?

If the name of your mountpoint really requires to include

  • two times the user name (jleman)
  • three instances of "webdav"
  • the protocol name "https:" as well as the default port ":443" of this protocol

then you might create an symbolic link for access.

Werner

- <_71007>
Thu 26 Nov 2020 09:01:41 AM UTC, original submission:  

In order to mount a webdav recourse a davfs2 trying to create a cache folder for it in a very strange way.

For ex. we mounting:

https://gofast.ceo-vision.com:443/TICKET_XXXREMOVEDFORDEBUGXXXe/alfresco/webdav/Sites/_jlemangarin/

Mounting folder:

/home/jleman/.tmp/webdav/webdavhttps:__gofast.ceo-vision.com:443_TICKET_XXXREMOVEDFORDEBUGXXXe_alfresco_webdav_Sites__jlemangarin_

With this cmd:

pkexec mount -t davfs -o uid=$USER,username=nologin https://gofast.ceo-vision.com:443/TICKET_XXXREMOVEDFORDEBUGXXXe/alfresco/webdav/Sites/_jlemangarin/ /home/jleman/.tmp/webdav/webdavhttps:__gofast.ceo-vision.com:443_TICKET_XXXREMOVEDFORDEBUGXXXe_alfresco_webdav_Sites__jlemangarin_

And got an error:

/sbin/mount.davfs: can't create cache directory /var/cache/davfs2/gofast.ceo-vision.com-TICKET_XXXREMOVEDFORDEBUGXXXe-alfresco-webdav-Sites-_jlemangarin+home-jleman-.tmp-webdav-webdavhttps:__gofast.ceo-vision.com:443_TICKET_XXXREMOVEDFORDEBUGXXXe_alfresco_webdav_Sites__jlemangarin_+jleman

As you could see, davfs creates a very long cache folder name, which exceedes a file system max file name limit 255 chars.

Could you change the way a cache folder name creates by changing it to hash code from this long path? I think 5 chars hash code will be enough.


Anonymous

 

(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)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-26 _71007 StatusNone Duplicate
        Assigned toNone _71007

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code