[转]ubuntu11.04配置nfs--解决mount.nfs: access denied问题
总算通过了nfs的localhost测试。
配置很简单,下面摘自网络,并且整理下:
1 安装nfs
#apt-get install nfs-kernel-server
#apt-get install nfs-common
2 配置/etc/exports
在文本末添加
#/root/nfs_root *(rw,sync,no_root_squash)
#chmod 777 -R /root/nfs_root
可以使用showmount -e来查看当前的配置是否已经生效
#showmount -e
Export list for medea-MS-7680:
说明还没有生效。
使用exportfs -r 更新配置
#exportfs -r
#showmount -e
Export list for medea-MS-7680:
/root/nfs_root *
3 启动
#/etc/init.d/nfs-kernel-server restart 重新nfs服务
简单吧,通过3步骤一般就可以使用nfs了。就可以使用localhost进行本地mount测试了。
网络一般还会配置/etc/hosts.deny与/etc/hosts.allow。主要是配置ip访问的权限控制。但是我不想配置,感觉个人电脑上没有什么重要的东西。就忽略了。
好了,我的噩梦开始了。
#mount -t nfs localhost:/root/nfs_root /root/book
出现了如下的提示:mount.nfs: access denied by server while mounting localhost:/root/nfs_root
花了我3天的时间,检测。 发现在公司的电脑配置没有问题。就家里的台式机会出问题。
网上search找不到任何原因。 郁闷了。
后来,我尝试了重新配置/home/medea作为挂载点,发现居然通过了。
我就到根目录下, ls -al。总算发现问题了。原来我的/root的权限是 drwx------ 43 root root 4096 2011-09-18 07:43 root
我就想到了, 本地mount上后,会是另一种用户登录。 原来是root访问权限出问题了。
于是:
#chmod 755 /root
在尝试
#mount -t nfs localhost:/root/nfs_root /root/book
[转]ubuntu11.04配置nfs--解决mount.nfs: access denied问题的更多相关文章
- 解决mount.nfs: access denied by server while mounting
在linux下进行挂载时突然出现: mount.nfs: access denied by server while mounting 第一感觉是读取文件权限不够,准备去更改一下挂载点的权限,但又考 ...
- 解决mount.nfs: access denied by server while mounting错误
环境:oraclelinux6.7 以前在centos服务器上安装nfs.挂载NFS都没出现问题,今天在oraclelinux上安装后,在客户端mount的时候报mount.nfs: access d ...
- NFS挂载时出现"access denied by server while mounting"的解决方法
NFS挂载时出现"access denied by server while mounting"的解决方法 2015-01-14 何敏杰 3条评论 44,071次浏览 NFS是 ...
- 怎样解决WampServer #1405 - Access denied for user 'root'@'localhost' (using password: NO)
转载请注明出处:http://blog.csdn.net/xingjiarong/article/details/47903227 之前一直在用wampserver,然后环境配置也是正确的,可是过了一 ...
- 完美解决Mysql的Access denied for user 'root'@'%的'问题
背景:mysql5.6 root已授权所有数据库,执行过下面的语句 grant all privileges on *.* to 'root'@'%' identified by 'root' 当使用 ...
- 解决报错:Access denied for user 'root'@'xxx' ,MySQL不允许从远程访问的方法 .
原文地址:传送门 例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话. GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDEN ...
- [MySQL] 解决Error 1698: Access denied for user 'root'@'localhost'
当程序中使用root账号连接mysql时报以下错误,但是使用命令行是可以正常连接的,那么就查询下mysql数据库的user表,查看下当前用户的密码加密方式,看看是不是unix_socketMariaD ...
- macOS X Mount NFS Share / Set an NFS Client
last updated November 3, 2018 in CategoriesLinux, Mac OS X, UNIX How do I access my enterprise NAS s ...
- NFS挂载异常 mount.nfs: Input/output error
[root@localhost ~]# vi /etc/exports #增加/nfs 192.168.10.132(rw,no_root_squash,no_all_squash,async) [r ...
随机推荐
- CCNA 课程 七
WAN(Wide Area Network)广域网 运行在OSI模型的数据链路层.物理层. 数据链路层的协议主要有: HDLC (High-Level Data Link Control 高级数据链 ...
- linux shell执行SQL脚本
#!/bin/sh user="user" pass="pass" sqlplus -S $user/$pass select 1 from dual; exi ...
- 集成Spring web.xml配置总结
1.web.xml 的加载顺序是:ServletContext -> context-param -> listener -> filter -> servlet 1.serv ...
- Google Chrome 未响应。是否立即重新启动?
不当的退出会造成 Google Chrome 无法启动.出现“Google Chrome 未响应.是否立即重新启动?”的错误.要解决这个问题: 1.同时按住Windows旗帜键 + R键,调 ...
- C# XML对象序列化、反序列化 - PEPE YU
http://www.tuicool.com/articles/IjE7ban http://www.cnblogs.com/johnsmith/archive/2012/12/03/2799795. ...
- QT中phonon的安装和使用
http://write.blog.csdn.net/postedit Phonon严格来说其实非为Qt的library,Phonon原本就是KDE 4的开放原始码多媒体API,後来与Qt合并与开发, ...
- The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files
要解决的话,方法有两个 1)可以选用较低版本的sdk,比如我就用回1.6版本的sdk window->preferences->Java->Installed JREs->Ad ...
- python中常见的日期换算
time模块提供各种操作时间的函数 说明:一般有两种表示时间的方式: 第一种是时间戳的方式(相对于1970.1.1 00:00:00以秒计算的偏移量),时间戳是惟一的 第二种 ...
- delphi 数据连接规范
建议大家采用另外一种编码风格,不要在程序中到处都有这种LZ程序生成的代码: begin with qryMain do begin try Close; SQL.Clear; SQL.Add('Del ...
- 用createinstallmedia创建可恢复的OSX安装DMG
准备 从App Store下载OS X安装程序,下载完成,会在应用程序目录 /Applications 下找到类似 Install OS X 10.xxxxxx.app(中文名如:安装 OS X 10 ...