Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: using symbolic link to deal with virus issue |
|
Author |
|
edwardsmarkf
Joined: 20 Feb 2013 Posts: 25 Location: cottonwood, az
|
Posted: Sun 28 Oct '18 23:05 Post subject: using symbolic link to deal with virus issue |
|
|
hello -
i would like to temporarily "protect" my index.php file from being changed by malware.
so, i am thinking the best way to do this would be to do the following:
1) move index.php file from the apache www directory to root directory
2) change the ownership to root
3) chmod to 444
4) create a symbolic link to the index.php file in the apache www directory.
unfortunately, i get back an error:
You don't have permission to access / on this server.
is there a way i can protect my index.php file using a method similar to what i just described? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 29 Oct '18 10:40 Post subject: |
|
|
For that you can use bindfs. The "better-user" can edit the files, while apache can't.
/etc/fstab
Code: |
/var/www /var/better-user-www/www/ fuse.bindfs force-user=better-user,perms=g+rw,create-for-user=better-user,nosuid,nodev
|
However to your initial question: do you allow in the "Option" FollowSymlinks ? |
|
Back to top |
|
|
|
|
|
|