在RHEL8上,我用ext4文件系统创建了一个lvm。将其添加到/etc/fstab中,但当我使用mount -av时,会得到以下错误:
You just mounted an file system that supports labels which does not
contain labels, onto an SELinux box. It is likely that confined
applications will generate AVC messages and not be allowed access to
this file system. For more details see restorecon(8) and mount(8).
/lvext4 : successfully mounted如果我在/lvext4中创建一个文件,那么SELinux上下文就是unconfined_u:object_r:unlabeled_t:s0 file1
当我挂载XFS时也会出现相同的错误。
发布于 2022-03-18 12:04:23
你所收到的不是错误。这是一个警告,即文件系统上没有SELinux标签。错误会阻止它安装,但是没有如消息所指示的那样发生:
/lvext4 : successfully mountedRHEL和大多数其他发行版并不会从一开始就自动将SELinux上下文应用于文件系统,而是由谁来管理系统。
如果您计划让应用程序访问LV上的数据,那么您需要修改上下文以允许它通过chcon和适当的开关(这取决于应用程序需要做什么)来实现。
如果不是这样的话,那么您就不需要做任何事情,只需忽略警告。由于LV在/etc/fstab中,那么它将在引导期间挂载,而且您也不会看到它。
https://unix.stackexchange.com/questions/694865
复制相似问题