安装网络文件系统时出错:mount error 20 = Not a directory
来源:互联网 发布:安卓免流量软件2017 编辑:程序博客网 时间:2024/06/06 08:55
升级到Fedora 9之后,发现无法像以前那样mount 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
- 浮点数在内存中的存储方式
- Web Service 记录
- 如何在图片上作滚动字幕
- Ural 1106. Two Teams
- UI细节问题
- 安装网络文件系统时出错:mount error 20 = Not a directory
- DNSstuff收费后的选择
- ZOJ 1828 Fibonacci Numbers (大数)
- 我的博客
- 简单Eclipse操作(一)
- 网上FLAC3D学习笔记
- 目的性标签:一点儿思考
- 股票代码的含义
- hibernate.hbm2ddl.auto