安装网络文件系统时出错:mount error 20 = Not a directory
来源:互联网 发布:maya for mac 破解版 编辑:程序博客网 时间:2024/05/21 20:10
升级到Fedora 9之后,发现无法像以前那样mount samba共享文件系统了。
当我使用如下命令:
mount samba共享文件时,会出现如下错误:
Google了一下,发现这种问题可能是由于cifs文件系统与较老版本的samba共享服务器不兼容所致,所以要解决这个问题,要么升级samba服务器程序,要么需要对cifs做些限制。根据网上的建议,可以使用:
修改cifs选项,禁止cifs的扩展功能,然后在mount就没有什么问题了。
但每次重启后都要执行一次这样的操作,未免有些麻烦,所以我改了一下系统的启动脚本,这样就可以把这些mount放到fstab里,让系统每次启动时自动mount了。方法如下:
修改/etc/init.d/netfs,按如下方式在start里添加+号所示的一行:
首先执行"/sbin/modprobecifs"是要加载cifs模块,否则我们所要修改的文件LinuxExtensionsEnabled可能还不存在,修改就会失败。由于不同启动Level的rc*.d/S**netfs都是链接到/etc/init.d/netfs的,所以此修改对所有启动Level都会生效。当然,如果你的系统不是这种链接,修改相应的文件也是一样的。
重启后再安装samba共享文件系统就没有问题了。
当我使用如下命令:
$mount -t cifs //192.168.1.2/samba /mnt/samba -o username=test,password=test
mount samba共享文件时,会出现如下错误:
mount error 20 = Not a directory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Google了一下,发现这种问题可能是由于cifs文件系统与较老版本的samba共享服务器不兼容所致,所以要解决这个问题,要么升级samba服务器程序,要么需要对cifs做些限制。根据网上的建议,可以使用:
$echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
修改cifs选项,禁止cifs的扩展功能,然后在mount就没有什么问题了。
但每次重启后都要执行一次这样的操作,未免有些麻烦,所以我改了一下系统的启动脚本,这样就可以把这些mount放到fstab里,让系统每次启动时自动mount了。方法如下:
修改/etc/init.d/netfs,按如下方式在start里添加+号所示的一行:
case "$1" in start)
+ /sbin/modprobe cifs && echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
...
首先执行"/sbin/modprobecifs"是要加载cifs模块,否则我们所要修改的文件LinuxExtensionsEnabled可能还不存在,修改就会失败。由于不同启动Level的rc*.d/S**netfs都是链接到/etc/init.d/netfs的,所以此修改对所有启动Level都会生效。当然,如果你的系统不是这种链接,修改相应的文件也是一样的。
重启后再安装samba共享文件系统就没有问题了。
- 安装网络文件系统时出错:mount error 20 = Not a directory
- 安装网络文件系统时出错:mount error 20 = Not a directory
- 安装网络文件系统时出错:mount error 20 = Not a directory
- 安装pnp4nagios时出现Pango-WARNING **: error opening config file '/home/www/.pangorc': Not a directory错误
- mount出错 Input/output error
- Oracle 监听 启动报错 tns-12560 tns-00530 linux error:20:not a directory 解决方法
- Oracle 监听 启动报错 tns-12560 tns-00530 linux error:20:not a directory 解决方法
- can not find a temporary directory:internal error
- linux安装weblogic报错: End-of-central-directory signature not found.Error during init, error code = 2
- 使用Gem install安装starling出错 ERROR: http://gems.rubyforge.org/ does not appear to be a rep
- Error starting static Resources:* does not exist or is not a readable directory
- 安装postgis2.0.1出错configure error: could not find gdal
- 安装psycopg2出错:Error:pg_config executable not found的解决
- 安装psycopg2出错:Error:pg_config executable not found的解决
- 安装psycopg2出错:Error:pg_config executable not found的解决
- Qt 编译出错 Could not create directory
- Nginx安装过程中make出错fatal error: pcre.h: No such file or directory
- USB安装EXSi出错,menu.c32 not a com32r image
- 远程接入+动态密码解决方案
- GetMessage PeekMessage
- hello
- PackageDemo.java
- TreeView(1)(一次性递归所有节点)
- 安装网络文件系统时出错:mount error 20 = Not a directory
- 想让你的电脑桌面右下方显示你的名字吗
- 四川人民太幽默了
- 文件内核对象的相关函数
- linux内核测试指南 第一章(初稿)
- 创建ACCESS的存储过程
- JDBC
- 关于Linux 下 使用JAVA出现中文小框框的问题
- 提高IT专业人员薪酬水平的十种方法