Welcome! Log In Create A New Profile

Advanced

Stop One Site From Viewing Other's Files

Posted by APag96 
Stop One Site From Viewing Other's Files
November 17, 2014 05:19PM
I'm pretty lost here. I've been searching everywhere and haven's had any luck on this yet. I have two server blocks set up under nginx. I followed this tutorial:
>> https://www.digitalocean.com/community/tutorials/how-to-configure-single-and-multiple-wordpress-site-settings-with-nginx

In order to test my security, I uploaded the c99 shell to one of the sites. I was able to browse the files of the other website just by going to the parent directory of the site a few times.

-WWW
|---test.com
|------index.php
|---test2.com
|------index.php

I hope I explained this good... I already have www-data:www-data as the owner (not sure if that's the right term) of the www directory.

How do I prevent a host from traversing upwards into another hosts files or even other files on my server?

Thank you so much in advance!
Re: Stop One Site From Viewing Other's Files
November 18, 2014 03:31AM
See http://forum.nginx.org/read.php?2,254701
Re: Stop One Site From Viewing Other's Files
November 18, 2014 09:04PM
Thanks for the suggestion! I gave that a look over. Here's where I'm at now:

I followed the following guide to set up php-fpm pools: http://www.rackspace.com/knowledge_center/article/installing-nginx-and-php-fpm-setup-for-php-fpm

Right now, I have a different pool and user for each of my sites.

I've still got the problem though. I can browse over to the other sites's files without a hitch.

Here's my /etc/php5/fpm/pool.d/websiteone_com.conf file for "websiteone.com":

[WEBSITEONE.COM]

listen = /var/run/php5-fpm/websiteone_com.socket
listen.backlog = -1
listen.owner = www-data
listen.group = www-data
listen.mode=0660

; Unix user/group of processes
user = websiteone_com
group = websiteone_com

; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500

; Pass environment variables
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

; host-specific php ini settings here
; php_admin_value[open_basedir] = /var/www/DOMAINNAME/htdocs:/tmp





Please, if you can give me any help as in what direction to go, I'd really appriciate it!



Edited 2 time(s). Last edit at 11/18/2014 09:08PM by APag96.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 161
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready