两个活字格服务器,我想共享上传的附件
操作系统ubuntu18
A服务器上我使用samba共享了一个文件夹Upload
B服务器上我创建了一个空目录Upload,想挂载A服务器的这个共享目录,可读写的
于是我使用命令
- mount -t cifs -o "rw,dir_mode=0777,file_mode=0777,username=用户名,password=密码" //A服务器/Upload /opt/Upload
复制代码
结果提示如下信息:
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
可是,我使用smbclient //ip/Upload -U 用户名 是可以访问共享的:
于是我又查了 man mount.cifs:
mount.cifs mounts a Linux CIFS filesystem. It is usually invoked indirectly by the mount(8) command when using the "-t cifs" option. This command only works in Linux,
and the kernel must support the cifs filesystem. The CIFS protocol is the successor to the SMB protocol and is supported by most Windows servers and many other commer‐
cial servers and Network Attached Storage appliances as well as by the popular Open Source server Samba.
The mount.cifs utility attaches the UNC name (exported network resource) specified as service (using //server/share syntax, where "server" is the server name or IP
address and "share" is the name of the share) to the local directory mount-point.
Options to mount.cifs are specified as a comma-separated list of key=value pairs. It is possible to send options other than those listed here, assuming that the cifs
filesystem kernel module (cifs.ko) supports them. Unrecognized cifs mount options passed to the cifs vfs kernel code will be logged to the kernel log.
mount.cifs causes the cifs vfs to launch a thread named cifsd. After mounting it keeps running until the mounted resource is unmounted (usually via the umount util‐
ity).
mount.cifs -V command displays the version of cifs mount helper.
然后我以为问题能解决了,于是我使用
mount.cifs //A服务器/Upload /opt/Upload -o username=用户名
输入密码后,仍然提示错误:
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
于是我迷茫了,只好来求助大家了
|