2

Here is the scenario:

I have a wordpress project which is blog of my main project. Apparently that wordpress project contains a malware which edits js files and modifies the value of href links. Sadly that malware is deployed over the whole root. I mean that malware works on the js files of the main project too.

Now I want to know, how can I make that wordpress project isolated? I want to limit accessibility of that wordpress project to only itself. To avoid publishing that malware (which exists in the wordpress project (which is a part of the main project)) in the whole main project?

I read somewhere, you can make a directory isolated on linux, like a different server. Any idea how can I do that?

0

1 Answer 1

2

I read somewhere, you can make a directory isolated on linux, like a different server. Any idea how can I do that?

If you want to have an isolated directory, you can use Chroot. That makes you able to isolating applications from the rest of your computer.

For this purpose, please read this article: BasicChroot.


how can I make that wordpress project isolated?

Also you use chattr command for making a directory and its contents immutable, even with root access.

sudo chattr -R +i /path/of/your/directory

After run above command any users can [change/remove/append] that directory and its constents.

And for remove immutable flag from that files, you can uses below command:

sudo chattr -R -i /path/of/your/directory
4
  • Just I'm not good in English and this and its contents immutable is vague for me. What do you mean exactly? It sounds to me like a constant file which files won't be modify at all. Right? While I want files to be editable, but no access to affect on other files out of that directory.
    – Shafizadeh
    Mar 4, 2018 at 9:27
  • @Shafizadeh Yes , immutable means that these files cannot be changed at all. If you want to make to be editable, but no access to affect on others file , you can use first method. Mar 4, 2018 at 9:30
  • @Shafizadeh If its not be worked, please add more details like what is that malware that affected your system Mar 4, 2018 at 9:32
  • Do you know what does "so you shouldn't use chroot as a security measure to prevent a program from modifying files outside your simulated filesystem" mean in this ?
    – Shafizadeh
    Mar 12, 2018 at 10:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .