centoslinux安装discuz已经设置目录权限为777还是提示不可写

it2022-05-09  57

centos/linux安装discuz已经设置目录权限为777还是提示不可写,这是因为什么原因呢?

这是因为selinux 开起的原因造成的,把seliunx关闭就可以了:

SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux® 上最杰出的新安全子系统。NSA是在Linux社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件。SELinux 默认安装在 Fedora 和 Red Hat Enterprise Linux 上,也可以作为其他发行版上容易安装的包得到。既然知道了原因,就很方便的可以解决。在selinux中单独开发文件权限可以自己搜索。这里我只是简单说明下怎么关闭selinux。

永久关闭SELinux

查看当前SELinux状态:/usr/bin/setstatus -v

编辑/etc/selinux/config,找到SELINUX 行修改成为:SELINUX=disabled:

# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted 

重启系统即可。

转载于:https://www.cnblogs.com/chunshu/p/6219499.html

相关资源:数据结构—成绩单生成器

最新回复(0)