简体   繁体   English

NFS 挂载红帽

[英]NFS mount Red Hat

I am trying to share a folder between two machines.我正在尝试在两台机器之间共享一个文件夹。 In the A machine I created a folder with 666 permission, in /etc/exports add an entry with <A machine folder> <B hostname>(ro,sync) and restart service nfs-server.在 A 机器上,我创建了一个具有 666 权限的文件夹,在 /etc/exports 中添加一个带有<A machine folder> <B hostname>(ro,sync)的条目并重新启动服务 nfs-server。

In the B machine I create a folder with 666 permission, add an entry in /etc/fstab with <A hostname><A path folder> <B path folder> nfs ro,sync 0 0在 B 机器中,我创建了一个具有 666 权限的文件夹,在 /etc/fstab 中添加一个条目,其中<A hostname><A path folder> <B path folder> nfs ro,sync 0 0

When I execute mount -a to force the mount in B machine, it shows that the directory is mounted correctly (with "mount" command I can check it) but when I try go inside the folder "Permission denied" appears.当我执行mount -a强制在 B 机器上挂载时,它显示目录已正确挂载(使用“mount”命令我可以检查它)但是当我尝试文件夹内的 go 时出现“权限被拒绝”。 I only can fix this message giving execution permission (665) to the folder located in the A machine.我只能修复此消息,将执行权限 (665) 授予位于 A 机器中的文件夹。

I have tried with many combinations for this purpose.为此,我尝试了许多组合。

I wouldn't like to give execution permision to the folder located in the A machine.我不想对位于 A 机器中的文件夹授予执行权限。

Any ideas?有任何想法吗?

Thank you ^^谢谢你^^

Just add to /etc/exports "no_root_squash"只需添加到 /etc/exports "no_root_squash"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM