linux nfsnobody用户,处理CentOS 5.5 x64 配置NFS服务过程中nfsnobody用户造成的问题

crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off

network         0:off   1:off   2:on    3:on    4:on    5:on    6:offnfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off

portmap         0:off   1:off   2:on    3:on    4:on    5:on    6:off

sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off

sysstat         0:off   1:off   2:on    3:on    4:off   5:on    6:off

3、我们重新启动一下服务器,确认一下上述修改都生效了,服务器启动正常。

[root@NFS ~]# shutdown -r now             (重启一下服务器)

[root@NFS ~]# /etc/init.d/portmap status  (确认一下portmap)

portmap (pid 2316) is running...

[root@NFS ~]# /etc/init.d/nfs statusrpc.mountd (pid 2434) is running...

nfsd (pid 2431 2430 2429 2428 2427 2426 2425 2424) is running...

rpc.rquotad (pid 2398) is running...

[root@NFS ~]# netstat -lnt                (查看一下RPC端口号是否正常)

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address               Foreign Address             State

tcp        0      0 0.0.0.0:2049                0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:882                 0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:917                 0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:7455                0.0.0.0:*                   LISTEN

tcp        0      0 :::65534                    :::*                        LISTEN

[root@NFS ~]#rpcinfo -p           (查看一下RPC注册的端口号)

program vers proto   port100000    2   tcp    111  portmapper

100000    2   udp    111  portmapper

100011    1   udp    879  rquotad

100011    2   udp    879  rquotad

100011    1   tcp    882  rquotad

100011    2   tcp    882  rquotad

100003    2   udp   2049  nfs

100003    3   udp   2049  nfs

100003    4   udp   2049  nfs

100021    1   udp  14392  nlockmgr

100021    3   udp  14392  nlockmgr

100021    4   udp  14392  nlockmgr

100003    2   tcp   2049  nfs

100003    3   tcp   2049  nfs

100003    4   tcp   2049  nfs

100021    1   tcp   7455  nlockmgr

100021    3   tcp   7455  nlockmgr

100021    4   tcp   7455  nlockmgr

100005    1   udp    914  mountd

100005    1   tcp    917  mountd

100005    2   udp    914  mountd

100005    2   tcp    917  mountd

100005    3   udp    914  mountd

100005    3   tcp    917  mountd

[root@NFS ~]# mkdir /share       (新建一个目录用于NFS共享)

[root@NFS ~]# cd /               (回到根目录)

[root@NFS /]# ll                 (查看一下)

total 166

drwxr-xr-x  2 root root  4096 Mar 23 20:52 bin

drwxr-xr-x  4 root root  1024 Mar 23 18:18 boot

drwxr-xr-x 12 root root  4220 May 27 19:42 dev

drwxr-xr-x 84 root root  4096 May 27 20:15 etc

drwxr-xr-x  3 root root  4096 Mar 23 22:26 home

drwxr-xr-x 11 root root  4096 Mar 23 20:52 lib

drwxr-xr-x  7 root root 12288 Mar 23 20:52 lib64

drwx------  2 root root 16384 Mar 23 18:14 lost+found

drwxr-xr-x  2 root root  4096 Jan 27  2010 media

drwxr-xr-x  2 root root  4096 Mar 31  2010 misc

drwxr-xr-x  2 root root  4096 Jan 27  2010 mnt

drwxr-xr-x  2 root root  4096 Jan 27  2010 opt

dr-xr-xr-x 79 root root     0 May 27 19:41 proc

drwxr-x---  2 root root  4096 Mar 23 22:24 root

drwxr-xr-x  2 root root 12288 Mar 23 20:52 sbin

drwxr-xr-x  2 root root  4096 Mar 23 18:14 selinux

drwxr-xr-x  2 root root  4096 May 27 20:16 share

drwxr-xr-x  2 root root  4096 Jan 27  2010 srv

drwxr-xr-x 11 root root     0 May 27 19:41 sys

drwxrwxrwt  3 root root  4096 May 27 19:42 tmp

drwxr-xr-x 15 root root  4096 Mar 23 18:16 usr

drwxr-xr-x 20 root root  4096 Mar 23 18:17 var

[root@NFS /]# chown nfsnobody:nfsnobody share    (我们修改一下share的所有者和所属组)

[root@NFS /]# ll                  (确认一下所有者和所属组修改好了)

total 166

drwxr-xr-x  2 root      root       4096 Mar 23 20:52 bin

drwxr-xr-x  4 root      root       1024 Mar 23 18:18 boot

drwxr-xr-x 12 root      root       4220 May 27 19:42 dev

drwxr-xr-x 84 root      root       4096 May 27 20:33 etc

drwxr-xr-x  3 root      root       4096 Mar 23 22:26 home

drwxr-xr-x 11 root      root       4096 Mar 23 20:52 lib

drwxr-xr-x  7 root      root      12288 Mar 23 20:52 lib64

drwx------  2 root      root      16384 Mar 23 18:14 lost+found

drwxr-xr-x  2 root      root       4096 Jan 27  2010 media

drwxr-xr-x  2 root      root       4096 Mar 31  2010 misc

drwxr-xr-x  2 root      root       4096 Jan 27  2010 mnt

drwxr-xr-x  2 root      root       4096 Jan 27  2010 opt

dr-xr-xr-x 77 root      root          0 May 27 19:41 proc

drwxr-x---  2 root      root       4096 Mar 23 22:24 root

drwxr-xr-x  2 root      root      12288 Mar 23 20:52 sbin

drwxr-xr-x  2 root      root       4096 Mar 23 18:14 selinux

drwxr-xr-x  2 nfsnobody nfsnobody  4096 May 27 20:16 share

drwxr-xr-x  2 root      root       4096 Jan 27  2010 srv

drwxr-xr-x 11 root      root          0 May 27 19:41 sys

drwxrwxrwt  3 root      root       4096 May 27 19:42 tmp

drwxr-xr-x 15 root      root       4096 Mar 23 18:16 usr

drwxr-xr-x 20 root      root       4096 Mar 23 18:17 var

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值