RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
After xtra file server install I think I may have a problem

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro
View previous topic :: View next topic  
Author Message
Joseph



Joined: 26 Jan 2007
Posts: 16

PostPosted: Oct 29, 2008 3:35 am    Post subject: After xtra file server install I think I may have a problem Reply with quote

I followed the instructions *** Extra File-Server Installation ***
Steps 1-3 were competed successfully

Then I run into a problem when I follow the following steps...

INFO: After installation try to open env.php which is in FileServer files folder in browser - it should show you error or source code.
If you see full path, then check that you've moved .htaccess to FileServer htdocs folder.


So I follow the instructions and type in my file server URL: http://fileserver.com/files/env.php and hit Enter.
The browser asks me if I want to Open or Save the file.

Isn't this some sort of error? There is an .htaccess in the "files" and "tmp" folders.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2109
Location: UFO Lab

PostPosted: Oct 29, 2008 7:22 am    Post subject: Reply with quote

So, go save it and see what's inside. If it's env.php source then it's all fine. If there's your server paths then u have possible php injection vulnerability and need to disable php execution in /files folder.
Back to top
View user's profile Send private message Visit poster's website
Joseph



Joined: 26 Jan 2007
Posts: 16

PostPosted: Oct 29, 2008 1:07 pm    Post subject: Reply with quote

When I choose the Save option and open the file it displays my path.
When I choose the Open option it displays my path within my browser.
Here is the path it displays:
/home/username/domains/fileserver.com/public_html/files/env.php

How do I disable PHP execution in the /files folder?
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2109
Location: UFO Lab

PostPosted: Oct 29, 2008 2:17 pm    Post subject: Reply with quote

Directives in .htaccess should do this actually.
Try these in apache config for /files/ folder:
Code:
<IfModule sapi_apache2.c>
   php_flag engine off
</IfModule>
<IfModule mod_php4.c>
   php_flag engine off
</IfModule>
<IfModule mod_php5.c>
   php_flag engine off
</IfModule>


But if you disable .php,.htm,.html files in XFS Site Settings then I think you will be pretty safe.
Back to top
View user's profile Send private message Visit poster's website
Joseph



Joined: 26 Jan 2007
Posts: 16

PostPosted: Oct 29, 2008 4:17 pm    Post subject: Reply with quote

PilgrimX182 wrote:
Directives in .htaccess should do this actually.
Try these in apache config for /files/ folder:
Code:
<IfModule sapi_apache2.c>
   php_flag engine off
</IfModule>
<IfModule mod_php4.c>
   php_flag engine off
</IfModule>
<IfModule mod_php5.c>
   php_flag engine off
</IfModule>


But if you disable .php,.htm,.html files in XFS Site Settings then I think you will be pretty safe.

Oh, okay I see now. I could apply the code to the apache config. BUT if I already disable .php,.htm,.html files in XFS Site Settings the extra code is not necessary then?
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2109
Location: UFO Lab

PostPosted: Oct 30, 2008 6:37 am    Post subject: Reply with quote

Not necessary, since we won't allow executable files there. Also restrict pl,cgi,py,sh extensions.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group