Bug 1246387
| Summary: | Can mount a sub-directory disregarding the IP-restrict when the export has a wildcard and an IP-restricted submount export | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yongcheng Yang <yoyang> |
| Component: | nfs-utils | Assignee: | Steve Dickson <steved> |
| Status: | CLOSED WONTFIX | QA Contact: | Yongcheng Yang <yoyang> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | steved, xzhou |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1198900 | Environment: | |
| Last Closed: | 2020-12-15 07:35:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Comment 2
Steve Dickson
2015-07-27 17:39:06 UTC
(In reply to Steve Dickson from comment #2) > The reason the mount server:/export/2 works is because > /export is exported to the world but /export/2 is > not Yes, that is the testing scenario. > so if do an ls on the mount point (/mnt/mnt_export.2/) > you will notice the '2' directory does not exist on the > client. Not quite understand what the "not exist" means, client can access everything under that subdirectory, as the following log shows. > > I believe this is the way it should work. So if the directory is exported to the world, it means that all its subdirectories are actually exported to world? Even if they are exported to a single host? Image that I have a Dir used to contain all the things exported with others. And then I will generate several subdirectory which stores different files to export to different single host, how can I do that currently? (Server) [root@hp-dl580g7-04 ~]# cat /etc/exports /export *(rw,subtree_check) /export/10.66.86.70 10.66.86.70(rw) /export/10.66.86.88 10.66.86.88(rw) [root@hp-dl580g7-04 ~]# service nfs restart Redirecting to /bin/systemctl restart nfs.service [root@hp-dl580g7-04 ~]# cat /export/10.66.86.70/testfile This is private message of 10.66.87.70 [root@hp-dl580g7-04 ~]# cat /export/10.66.86.88/testfile This is private message of 10.66.86.88 [root@hp-dl580g7-04 ~]# (Client) [root@ibm-x3550m3-06 ~]# showmount -e hp-dl580g7-04.rhts.eng.nay.redhat.com Export list for hp-dl580g7-04.rhts.eng.nay.redhat.com: /export * /export/10.66.86.88 10.66.86.88 /export/10.66.86.70 10.66.86.70 [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/10.66.86.70/ /mnt/mnt_export.1/ [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/10.66.86.88/ /mnt/mnt_export.2/ [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export.1/testfile This is private message of 10.66.87.70 [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export.2/testfile This is private message of 10.66.86.88 [root@ibm-x3550m3-06 ~]# (In reply to Yongcheng Yang from comment #3) > (In reply to Steve Dickson from comment #2) > > The reason the mount server:/export/2 works is because > > /export is exported to the world but /export/2 is > > not > Yes, that is the testing scenario. > > > so if do an ls on the mount point (/mnt/mnt_export.2/) > > you will notice the '2' directory does not exist on the > > client. > Not quite understand what the "not exist" means, client can access > everything under that subdirectory, as the following log shows. Do an ls on the mount point on the client. The '2' directory will not show up. > > > > > I believe this is the way it should work. > > So if the directory is exported to the world, it means that all its > subdirectories are actually exported to world? Even if they are exported to > a single host? No. that's the point. The subdirectories will not be seen. (In reply to Steve Dickson from comment #4) > (In reply to Yongcheng Yang from comment #3) > > (In reply to Steve Dickson from comment #2) > > > The reason the mount server:/export/2 works is because > > > /export is exported to the world but /export/2 is > > > not > > Yes, that is the testing scenario. > > > > > so if do an ls on the mount point (/mnt/mnt_export.2/) > > > you will notice the '2' directory does not exist on the > > > client. > > Not quite understand what the "not exist" means, client can access > > everything under that subdirectory, as the following log shows. > Do an ls on the mount point on the client. The '2' directory > will not show up. But it shows up on the client mountpoint. [root@ibm-x3550m3-06 ~]# showmount -e 10.66.87.145 Export list for 10.66.87.145: /export * /export/10.66.86.88 10.66.86.88 /export/10.66.86.70 10.66.86.70 [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/ /mnt/mnt_export/ [root@ibm-x3550m3-06 ~]# ls /mnt/mnt_export/ 10.66.86.70 10.66.86.88 [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export/10.66.86.70/testfile This is private message of 10.66.87.70 [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export/10.66.86.88/testfile This is private message of 10.66.86.88 [root@ibm-x3550m3-06 ~]# > > > > > > > > > I believe this is the way it should work. > > > > So if the directory is exported to the world, it means that all its > > subdirectories are actually exported to world? Even if they are exported to > > a single host? > No. that's the point. The subdirectories will not be seen. (In reply to Yongcheng Yang from comment #5) > (In reply to Steve Dickson from comment #4) > > (In reply to Yongcheng Yang from comment #3) > > > (In reply to Steve Dickson from comment #2) > > > > The reason the mount server:/export/2 works is because > > > > /export is exported to the world but /export/2 is > > > > not > > > Yes, that is the testing scenario. > > > > > > > so if do an ls on the mount point (/mnt/mnt_export.2/) > > > > you will notice the '2' directory does not exist on the > > > > client. > > > Not quite understand what the "not exist" means, client can access > > > everything under that subdirectory, as the following log shows. > > Do an ls on the mount point on the client. The '2' directory > > will not show up. > But it shows up on the client mountpoint. > > [root@ibm-x3550m3-06 ~]# showmount -e 10.66.87.145 > Export list for 10.66.87.145: > /export * > /export/10.66.86.88 10.66.86.88 > /export/10.66.86.70 10.66.86.70 > [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/ /mnt/mnt_export/ > [root@ibm-x3550m3-06 ~]# ls /mnt/mnt_export/ > 10.66.86.70 10.66.86.88 > [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export/10.66.86.70/testfile > This is private message of 10.66.87.70 > [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export/10.66.86.88/testfile > This is private message of 10.66.86.88 > [root@ibm-x3550m3-06 ~]# make sure the export cache clear exportfs -uav exportfs -arv then retry the mounts (In reply to Steve Dickson from comment #6) > make sure the export cache clear > > exportfs -uav > exportfs -arv > > then retry the mounts Still can be reproduced. (Server) [root@hp-dl580g7-04 ~]# cat /etc/exports /export *(rw,subtree_check) /export/10.66.86.70 10.66.86.70(rw) /export/10.66.86.88 10.66.86.88(rw) [root@hp-dl580g7-04 ~]# exportfs -uav ^^^^^^^^^^^^^^^ [root@hp-dl580g7-04 ~]# exportfs -arv ^^^^^^^^^^^^^^^ exporting 10.66.86.88:/export/10.66.86.88 exporting 10.66.86.70:/export/10.66.86.70 exporting *:/export [root@hp-dl580g7-04 ~]# (Client) [root@ibm-x3550m3-06 ~]# exportfs -uav [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/ /mnt/mnt_export/ [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export/10.66.86.88/testfile This is private message of 10.66.86.88 [root@ibm-x3550m3-06 ~]# cat /mnt/mnt_export/10.66.86.70/testfile This is private message of 10.66.87.70 [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/10.66.86.70 /mnt/mnt_export.1/ [root@ibm-x3550m3-06 ~]# mount 10.66.87.145:/export/10.66.86.88 /mnt/mnt_export.2 [root@ibm-x3550m3-06 ~]# nfsstat -m /mnt/mnt_export from 10.66.87.145:/export Flags: rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.86.70,local_lock=none,addr=10.66.87.145 /mnt/mnt_export.1 from 10.66.87.145:/export/10.66.86.70 Flags: rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.86.70,local_lock=none,addr=10.66.87.145 /mnt/mnt_export.2 from 10.66.87.145:/export/10.66.86.88 Flags: rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.86.70,local_lock=none,addr=10.66.87.145 [root@ibm-x3550m3-06 ~]# showmount -e 10.66.87.145 Export list for 10.66.87.145: /export * /export/10.66.86.88 10.66.86.88 /export/10.66.86.70 10.66.86.70 [root@ibm-x3550m3-06 ~]# After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |