1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Apache,ModSecurity can i prevent a script be executed from certain path?

Discussion in 'Apache' started by postcd, Sep 24, 2017.

  1. #1
    Hello,
    i have Linux, Apache, SuPHP, Mod Security web server and i want to use
    - ModSecurity or
    - Apache Include files or
    - PHP.ini or
    - some similar kind of software
    to disallow users to run files from certain paths, for example: /tmp
    It seems that my scripts needs exec() kind of PHP functions, and i can not globaly disable these because then i can not selectively enable it for certain users. I can selectively enable only certain PHP functions, but not all (like exec()). So i wish You can advise other way to disallow an user to execute a script in certain path (like /tmp) from within his/her .php script.

    Because i assume the .php scripts (maybe also .js?) can execute m@licious scripts (perl, python, sh?...) using exec kind of functions. I already set the /tmp mount point with noexec mount option, but i am looking what else i can do to stop execution of perl/python and similar scripts.
    SEMrush
     
    Last edited: Sep 24, 2017
    postcd, Sep 24, 2017 IP
    SEMrush