首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在不安装davfs2的情况下以编程方式在Ubuntu上挂载WebDAV?

如何在不安装davfs2的情况下以编程方式在Ubuntu上挂载WebDAV?
EN

Stack Overflow用户
提问于 2012-02-29 09:00:06
回答 2查看 2.8K关注 0票数 2

我需要以编程方式在Ubuntu上挂载WebDAV文件夹。我找到了一个使用davfs2的解决方案。

但是,默认情况下,davfs2不会安装在Ubuntu上。同时Gnome 'Places->Connect to Server...‘菜单可以在不安装davfs2的情况下执行此操作。我假设它也不需要root权限。

你知道如何在不安装davfs2的情况下挂载WebDAV吗?

EN

回答 2

Stack Overflow用户

发布于 2012-02-29 09:10:35

在Ubuntu安装中已经有一个命令行工具:nd。但这需要一直输入用户名和密码。

如果您可以从源代码构建一个像cadaver这样WebDAV客户端

您可以在configure中使用--prefix选项,并选择您具有写访问权限的文件夹:

代码语言:javascript
复制
./configure --prefix=/home/me/cadaver/
make
make install

cadaver支持通过.netrc文件自动登录到需要身份验证的服务器

票数 1
EN

Stack Overflow用户

发布于 2017-03-13 23:15:41

Ubuntu有一个可用于所有当前支持的版本的cadaver package,所以不需要编译。您可以使用JScoobyCed提到的命令sudo apt-get install cadaver安装它:"cadaver支持通过.netrc文件自动登录到需要身份验证的服务器“。

以下是手册页的几个摘录:

代码语言:javascript
复制
THE .netrc FILE
       The file ~/.netrc may be  used  to  automatically  login  to  a  server
       requiring  authentication.  The  following tokens (separated by spaces,
       tabs or newlines) may be used:

       machine host
              Identify a remote machine host which is compared with the  host‐
              name  given  on  the  command line or as an argument to the open
              command.  Any subsequent tokens up to the end  of  file  or  the
              next machine or default token are associated with this entry.

       default
              This  is  equivalent  to the machine token but matches any host‐
              name. Only one default token may be used and it  must  be  after
              all machine tokens.

       login username
              Specifies  the  username  to  use  when logging in to the remote
              machine.

       password string
       passwd string
              Specifies the password to use when  logging  in  to  the  remote
              machine.

       Any other tokens (as described in ftp(1)) are ignored.


EXAMPLES
       cadaver http://dav.example.com/
              Connects to the server myserver.example.com, opening the root collection.

   cadaver http://zope.example.com:8022/Users/fred/
          Connects to the server zope.example.com using port 8022, opening the collection "/Users/fred/".

   cadaver https://secure.example.com/
          Connects to a server called secure.example.com using SSL.

FILES
       ~/.cadaverrc
              Individual user settings that can override cadaver defaults and to script cadaver. Can be changed by the "--rcfile" option.

       ~/.netrc
              Login and initialization information used by the auto-login process. See section "THE .netrc FILE" for details.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9492179

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档