我遇到了调用perl和shell脚本的PHP接口的问题。 这些function可以将file upload到一个文件夹,并在一些input中执行它们,同时将输出存储到其他文件中。 现在看来,我可以给读写访问或执行使用下列之一: chcon -Rv –type=httpd_sys_rw_content_t user_dir/ chcon -Rv –type=httpd_fastcgi_script_exec_t user_dir/ 我怎样才能recursion启用文件夹具有读写和执行权限?
我有一个运行在Puma后面的ruby应用程序,在nginx后面。 我想用SELinux来降低它被用作我们系统其他部分的入口点的风险。 我无法find系统pipe理员为内部应用程序(创build新的SELinux标签,规则等)提供参考,只使用回购提供的SELinux标签。 我采取了错误的方法,还是我错过了什么?
我正在尝试在Fedora 22上configurationNIS客户端。按照教程http://www.server-world.info/en/note?os=Fedora_22&p=nis&f=2 。 我必须设置SELinux =禁用,以便可以在初始绑定时自动创build文件夹。 问题是内容没有显示出来。 但不给错误。 任何人有任何想法?
我被要求在CentOS 7操作系统上使用http和svn协议运行颠覆。 安装了Apache和Subversion。 当apache和subversion访问版本库时,会出现这个问题。 Apache使用设置: #ls -Z drwxr-xr-x apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 repository 但在这种情况下,svnserve无法访问它。 Svnserve在设置#chcon -R -t svnserve_content_t /var/www/repository 。 但在这种情况下,http协议(apache)被SELinux阻止。 我在这里发现了类似的问题: 如何让SELinux在同一个文件夹上允许Apache和Samba? 。 但是在阅读更多内容之后,我select了CentOS wiki中描述的程序,并创build了一个自定义的SELinux策略。 该政策如下所示: module my_svnserve 1.0; require { type proc_t; type passwd_file_t; type httpd_sys_rw_content_t; type shell_exec_t; type random_device_t; type svnserve_t; type http_port_t; type bin_t; class capability { fsetid dac_override }; class tcp_socket […]
在共享主机上运行Centos 7虚拟实例。 他们使用VMWare vSphere虚拟机pipe理程序。 这是一个定制的最小安装加上openssh和vmware工具。 所有更新应用。 SELinux默认安装在禁用模式下。 我所做的是在selinuxconfiguration中设置许可模式,并重新启动。 在所有重新启动之后,有9个由selinux报告的权限拒绝,全部与ldconfig相关。 试图重新标记整个文件系统,并临时删除ld.so.conf和ld.so.conf.d但没有任何改变。 1. 2016-03-25 08:17:03 ldconfig system_u:system_r:ldconfig_t:s0 59 fifo_file write system_u:object_r:initrc_tmp_t:s0 denied 16 2. 2016-03-25 08:17:03 ldconfig system_u:system_r:ldconfig_t:s0 257 dir read system_u:object_r:initrc_tmp_t:s0 denied 17 3. 2016-03-25 08:17:03 ldconfig system_u:system_r:ldconfig_t:s0 2 dir write system_u:object_r:initrc_tmp_t:s0 denied 18 4. 2016-03-25 08:17:03 ldconfig system_u:system_r:ldconfig_t:s0 2 dir add_name system_u:object_r:initrc_tmp_t:s0 denied 18 5. […]
我有一台运行CentOS7的服务器,php-fpm是PHP7.0.7,还有一个是SELinux。 我正在尝试debugging在该服务器上运行的PHP脚本。 我有一台运行PHP风暴的Mac机器,我打算进行debugging。 我遵循这个指南Phpstorm。 以下是我所做的: 1)安装xdebug到服务器 2)设置xdebugconfiguration如下: 的zend_extension = “的/ usr / lib64下/ PHP /模块/ xdebug.so” xdebug.remote_enable = 1 xdebug.remote_host = “localhost” 的 xdebug.remote_port = 9099 xdebug.remote_handler = dbgp xdebug.remote_autostart = 1 xdebug.idekey = “PHPSTORM” 3)设置sshconfiguration有:AllowTcpForwarding是(我然后恢复它,因为它没有帮助) 4)重新启动php-fpm,sshd和httpd 5)在我的本地terminal,打开ssh连接到指定-R标志的服务器 $ ssh -R 9099:localhost:9099 user @ host 6)改变我的phpstorm中的xdebugconfiguration来监听端口9099,并在index.php中设置一个断点 7)在我的浏览器中打开网站 但是我的本地xdebug并没有停在断点处。 我在configuration中可能会丢失什么? 难道是SElinux阻止debugging吗?
我试图覆盖public_html目录的默认规则: /home/[^/]*/((www)|(web)|(public_html))(/.+)? unconfined_u:object_r:httpd_user_content_t:s0 分配httpd_user_ rw _content_t上下文 我试图用相同的path添加另一条规则: semanage fcontext -a -t httpd_user_rw_content_t "/home/[^/]*/((www)|(web)|(public_html))(/.+)?" 但是restorecon -R /home/user/public_html仍然会分配httpd_user_content_t上下文。 有没有办法覆盖默认规则? (编辑file_contexts.homedirs看起来不是一个好主意…)
我有一个/opt/rtd/gunicorn/run.sock套接字文件: /opt/rtd/gunicorn/run.sock 。 我需要nginx能够打开此套接字并写入它。 当我运行sesearch –allow -s httpd_t | grep unix_stream_socket sesearch –allow -s httpd_t | grep unix_stream_socket我注意到httpd_t被允许连接到types为httpd_t的套接字。 但是当我尝试申请时,我得到: # semanage fcontext -a -t httpd_t "/opt/rtd/gunicorn/run.sock" ValueError: Type httpd_t is invalid, must be a file or device type 我尝试过从sesearch中find的其他types,例如httpd_sys_script_t甚至是passenger_t 。 同样的结果。 我应该怎么设置types? 我宁愿不必制定额外的政策,以允许超过必要的。 必须有一种方法允许httpd_t从CentOS 7.2中的现有策略的文件套接字读取,对吧?
这是SELinux执行时发生的情况: [root@shadmin ~]# elinks –dump 127.0.0.1/ASP-Portal/index.aspx Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. ————————————————————————– Apache/2.2.15 (Red Hat) Server at 127.0.0.1 Port 80 [root@shadmin ~]# tail /var/log/httpd/error_log [Tue Aug 09 17:27:00 2016] [notice] caught SIGTERM, shutting down [Tue Aug 09 […]
我有一个Web服务器主机(Linux上的Apache),它运行许多虚拟主机,它们使用“chroot”来提供CGI和FastCGI来彼此分离进程。 由于多种原因,我正在考虑用Linux容器来replace每个chroot环境。 令人惊讶的是,我几乎找不到这个想法! 我是唯一一个有这个想法的人吗? 这是一个坏主意吗? (用户可以从容器中逃脱吗?)有人有兴趣与我分享他的想法(或链接)吗? 不幸的是,容器只能用于CGI和FastCGI,因为一个进程/线程(在这个例子中是Apache)不能进入一个容器,而是工作并离开。 他必须在这个阶段退出,对吗? 还是有一个窍门?