dqc2017 2013-01-15 14:51
浏览 84

Apache服务器禁止在上层目录中打开php文件

I have server seciurity problem. Problem is virus that spreads from one of weakly programmed sites on server. directory structure is as follows (DirectAdmin): domains

-domain1.com
--public_html
-domain2.com
--public_html
-domain3.com
--public_html
-domain4.com
--public_html

What I'm looking for: Long time ago i head something about possibility of blocking inclusion of files from upper dirs (can't find it, since dont know how it's called).

What I want is to block possiblity to open files in PHP when: Script is called from public_html/index.php

  • I want it to be able to fopen/file_get_contents/require/include files that are in public_html and subdirectories
  • I also want to block possibiliy to access files that are are in parent directories of public_html

Problem is caused because server administrator uses same user to own ftp files as to execute them with apache. Virus spreads since I cannot deny "write" to those files.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 yolov8边框坐标
    • ¥15 matlab中使用gurobi时报错
    • ¥15 WPF 大屏看板表格背景图片设置
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真