当前位置: 首页> 科技> 能源 > 建设工程合同解释_互联网技术培训学校_济南百度seo_企业seo的措施有哪些

建设工程合同解释_互联网技术培训学校_济南百度seo_企业seo的措施有哪些

时间:2025/7/13 16:45:26来源:https://blog.csdn.net/hanxu2022014130/article/details/143314524 浏览次数:0次
建设工程合同解释_互联网技术培训学校_济南百度seo_企业seo的措施有哪些

架设一台NFS服务器,并按照以下要求配置:

1、开放/nfs/shared目录,供所有用户查询资料:

2、开放/nfs/upload目录,为192.168.xxx.0/24网段主机可以上传目录,并将所有用户及所属的组映射为nfs-upload,其UID和GID均为2103

3,将/home/tom目录仅共享给192.168.xxx.xxx这台主机,并只有用户tom对该目录有读写权限

一,开放 /nfs/shared目录

服务端: 

创建该目录:

[root@localhost ~]# mkdir /nfs/shared/ -p

在 /etc/exports下编辑开放的目录:

 [root@localhost shared]# vim /etc/exports

重启nfs服务:

[root@localhost shared]# systemctl stop firewalld---关闭防火墙
[root@localhost shared]# setenforce 0 ---关闭selinux

[root@localhost shared]# exportfs -ra

 客户端:

首先查看共享的目录信息

[root@localhost ~]# showmount -e 192.168.79.129
Export list for 192.168.79.129:
/nfs/shared *

 挂载

[root@localhost ~]# mount 192.168.79.129:/nfs/shared /test
[root@localhost ~]# ll /test
total 0
-rw-r--r--. 1 root root 0 Oct 28 22:01 1
-rw-r--r--. 1 root root 0 Oct 28 22:01 2

-rw-r--r--. 1 root root 0 Oct 28 22:01 3

 

二,开放/nfs/upload目录 

服务端: 

 更改配置文件

[root@localhost ~]# cat /etc/exports
/nfs/shared/   *()
/nfs/upload/  192.168.79.0/24(rw,all_squash,anonuid=2103,anongid=2103)

重启服务:

[root@localhost ~]# exportfs -ra

创建用户

[root@localhost ~]# useradd -u 2103 nfs

赋予权限:

[root@localhost ~]# chmod o+w /nfs/upload
 

客户端:

 查看共享目录文件

[root@localhost ~]# showmount -e 192.168.79.129
Export list for 192.168.79.129:
/nfs/shared *
/nfs/upload 192.168.79.0/24

 挂载:

[root@localhost ~]# mount 192.168.79.129:/nfs/upload /nfs-upload

创建用户 

 [root@localhost ~]# useradd -u 2103 nfs-upload

创建文件;

[root@localhost ~]# touch /nfs-upload/a
[root@localhost ~]# ll /nfs-upload
total 0
-rw-r--r--. 1 up-load up-load 0 Oct 29 18:31 a
-rw-r--r--. 1 root    root    0 Oct 29 17:39 {a...c}
 

基于id操作

三,/home/tom目录 

服务端:

[root@localhost ~]# cat /etc/exports
/nfs/shared/   *()
/nfs/upload/  192.168.79.0/24(rw,all_squash,anonuid=2103,anongid=2103)
/home/tom     192.168.79.133(rw)
 

创建用户:


 [root@localhost ~]# useradd -u 111 tom

重启服务:

[root@localhost ~]# exportfs -ra
 

客户端:

挂载

[root@localhost ~]# mount 192.168.79.129:/home/tom /tom

创建用户

  [root@localhost ~]# useradd -u 111 tom

测试:

首先用root访问:

[root@localhost ~]# cat /tom
cat: /tom: Permission denied
 --------权限拒绝

使用tom用户访问:

[root@localhost ~]# su - tom
[tom@localhost ~]$ cat /hom/tom
cat: /hom/tom: No such file or directory
 -----访问成功

关键字:建设工程合同解释_互联网技术培训学校_济南百度seo_企业seo的措施有哪些

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: