The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Case 104037] Webdavs server (WebDisk) sending wrong mime type

Discussion in 'General Discussion' started by johnnew, Jun 1, 2014.

  1. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I am using the Web Disk webdavs protocol to access my files on a cPanel host. I am using OpenSUSE Linux with KDE 4 and the Dolphin file manager.

    Whenever I open a file for editing, Dolphin shows a dialog box that says, "There is no application installed that can open files of the type httpd/unix-file. Do you want to try to install one?" I have to then decline the dialog box and manually choose the application to open the file.

    This happens no matter what type of file is opened. It seems the webdavs server sends the mime-type of every file as "httpd/unix-file".

    While this is not a big deal if I had to open a file now and then, it gets annoying when I have to do it a lot, which is the case at the moment.

    With some Googling, I found a KDE bug report that speculates that this behaviour is caused by either a missing or misconfigured mod_mime apache module. See https://bugs.kde.org/show_bug.cgi?id=289083 in general and Comments 6, 9 and 15 specifically: https://bugs.kde.org/show_bug.cgi?id=289083#c6 , https://bugs.kde.org/show_bug.cgi?id=289083#c9 and https://bugs.kde.org/show_bug.cgi?id=289083#c15

    When I asked my hosting provider about this, they said, "Unfortunately, there isn't much we can do on this. This is more of cPanel issue, since it is not handled by webserver but cpanel itself for webdav access for it, and it does not have it own mime table for use."

    Is there anything that can be done?

    Thanks,

    John New
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you tried using third-party software other than the dolphin file manager to connect to web disk? This could help isolate the issue further.

    Thank you.
     
  3. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi Michael,

    I tried GNOME Nautilus (under KDE) and the same problem occurred, but worse.

    The first time I tried to open a .php file, I got the same error message referencing the mime-type httpd/unix-file. As with Dolphin, it allowed me to choose which application would open the file (I chose a text editor, in this case). However, when I went to open a .jpg file, Nautilus tried to open that file with the text editor because it had associated the httpd/unix-file type with a text editor. (Dolphin doesn't seem to associate a mime type with a program when using webdavs, so I get the same file type warning every time.)

    So, still the same problem.

    I guess I could install a complete GNOME desktop to rule out a KDE problem. Possibly I could even get hold of a Windows machine as well, but I think Windows handles file associations by file extension (is that still the case? I haven't used Windows in a long time).

    John
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could also have your hosting provider open a support ticket with us on your behalf so we can take a closer look. If you do choose to do that, please post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have asked my hosting provider to open a support ticket. I'll post here with their reply and hopefully a ticket number.

    Thanks again,

    John
     
  6. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    My hosting provider has opened a ticket on this issue and the ticket number is 5026769.

    John
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, we have yet to reproduce the issue due to a lack of authentication details to the affected server. I will update this thread with more information once that is provided in the ticket.

    Thank you.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The ticket was closed due to a lack of user response after our request for authentication details. Please ensure you have them reply to the ticket if you would like us to investigate further.

    Thank you.
     
  9. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have nudged my hosting provider about the ticket. I'll let you know what happens.
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This is happening because we only send the 'unix-file' type for any non-directory item on the system. I'm not sure why this was chosen (as opposed to sending the actual mime type). Thank you for your patience in helping us find this.
     
  11. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Glad to have been a help.

    I created an account for cPanel support at my hosting provider and gave them the credentials to provide in their ticket with you. But if this behaviour is common to all cPanel installs and not a misconfiguration, I'm not sure if that account really helped that much.

    Is this something that cPanel hopes to fix?
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Internal case 104037 is now open regarding this issue. That's not to say a change in the current behavior is guaranteed, but it's under review to determine if sending the actual mime type is feasible. I will ensure this thread is updated with the outcome of the case.

    Thank you.
     
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Your patience, and assistance, helped our technical support staff narrow down the issue, and reproduce it. That enabled them to file a well-formed bug report. That bug report prompted my investigating the issue and identifying the root cause in the source. All of that came about because of your actions. Thank you!

    Please feel free to remove the account you created for this. We have sufficient information now to reliable reproduce it for testing purposes.
     
  14. johnnew

    johnnew Member

    Joined:
    Jun 1, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Kenneth and Michael,

    Thanks for all your work and I'm pleased that the test account actually did help.

    My hosting provider passed along some information from the cPanel internal case suggesting to "use a WebDav client that allows a 'sync' of the files with a local store [so] it could use the Operating Systems mime type handling for the local file". That suggestion, a pointer to an article about mounting a webdav resource, and some googling, provided a workaround: locally mount the webdav resource using the davfs2 or wdfs filesystems.

    Essentially, the workaround involves adding a mountpoint to the local filesystem, say /mnt/webdav, and then a line in /etc/fstab to handle the mounting:

    For davfs2, the fstab entry is in the form:
    https://server[:port][/directory/] /mountpoint davfs [options] 0 0
    For the complete process, see Kasun's Tech Blog: Mounting a WebDAV directory in Linux (Ubuntu)

    For wdfs, the fstab entry is in the form:
    wdfs#http://server[:port][/directory/] [mountpoint] fuse [options] 0 0
    For more info type wdfs --help at the command line, and see mounting webdav using wdfs

    I would think the minimum [options] needed would be: username=<webdav_username>,password=<webdav_password>

    Alternatively, you could also mount the webdav resource from the command line as root:

    wdfs http://server[:port][/directory/] [mountpoint] -o [options]
    or
    mount -t davfs2 http://server[:port][/directory/] [mountpoint] -o [options]

    I hope this post helps someone else with the workaround.

    Thanks again
     
    #14 johnnew, Jun 11, 2014
    Last edited: Jun 11, 2014
Loading...

Share This Page