To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Other Languages > PHP

Reply Post New Thread
 
Thread Tools Display Modes
Old Apr 18th, 2006, 08:32 PM   #1
Ruku
Fanatic Member
 
Ruku's Avatar
 
Join Date: Jul 02
Location: Canada
Posts: 655
Ruku is an unknown quantity at this point (<10)
Resolved Apache chroot question... [resolved]

Greetings people...

First off, sorry if this is in the wrong section, but I couldn't figure where to put my thread, move if needed...

I just bought a domain of one & one (great deal 7$ domain)... and I don't think you can enable a wildcard (*.mydomain.com) through them... which I usually used with apache.

I used my sub-domains for user webpages, they have full access to their root, but they have access denial to anything else...

apache config:
Code:
<VirtualHost *>
 DocumentRoot d:/web/member/USERXXXXXXXX
 ServerName USERXXXXXXXX.mydomain.com
 User USERXXXXXXXX
 Group MYGROUP_FTP
 php_admin_value open_basedir "z:/web/member/USERXXXXXXXX"
</VirtualHost>
so there, that was the way I locked them... however, since 1 & 1 does not allow wildcard fowarding (or so I think, help me on this if yes),

My question is this how can I lock them to a folder... instead of a domain?

let's say I do a virtual directory of

mydomain.com/member/USERXXXXXXXX

how can he be locked to z:\web\member\USERXXXXXXXX?

(I'd need to change "ServerName USERXXXXXXXX.mydomain.com" by something that gets a folder instead of a domain)

Thanks in advance to break out your heads for me...!!!!!


__________________

Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
Website: http://DreamForgery.com

Last edited by Ruku; Apr 27th, 2006 at 06:25 PM.
Ruku is offline   Reply With Quote
Old Apr 19th, 2006, 01:38 PM   #2
Ruku
Fanatic Member
 
Ruku's Avatar
 
Join Date: Jul 02
Location: Canada
Posts: 655
Ruku is an unknown quantity at this point (<10)
Re: Apache chroot question...

*bump*

A friend of mine showed me "htaccess" methods in the apache config file...

what htaccess does is simple, it gives read/write permissions over the directories you have within apache (real or virtual).

However, the problem is that all users would have read access to my main .php files, which is a problem.

I really need to chroot the folder, so that the php files within the folder don't have access to anywhere else than within the folder...

my brain is still going on this... any help, any at all?
__________________

Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
Website: http://DreamForgery.com

Last edited by Ruku; Apr 19th, 2006 at 01:46 PM.
Ruku is offline   Reply With Quote
Old Apr 20th, 2006, 05:19 AM   #3
penagate
Super Moderator
 
Join Date: Jan 05
Location: Sunny Adelaide
Posts: 12,738
penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)penagate has much to be proud of (1500+)
Re: Apache chroot question... [Unresolved]

Change permissions either through an FTP client or your hosting software such as Cpanel or DirectAdmin, both have file system tools.
penagate is offline   Reply With Quote
Old Apr 20th, 2006, 11:21 AM   #4
Ruku
Fanatic Member
 
Ruku's Avatar
 
Join Date: Jul 02
Location: Canada
Posts: 655
Ruku is an unknown quantity at this point (<10)
Re: Apache chroot question... [Unresolved]

All the permissions are already set...

What I'm looking for is a way to login the user locked under the permissions over a specific folder, which would be his root...

(I don't need 1 general user account, I need to chroot all users individually)

how do I do that through apache config?
__________________

Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
Website: http://DreamForgery.com
Ruku is offline   Reply With Quote
Old Apr 20th, 2006, 03:04 PM   #5
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,835
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Apache chroot question... [Unresolved]

The only way you can croot PHP is to have it start as root, carry out the chroot and demote itsself to the user you want to run it as. There are programs that do this for you, such as suexec. To do this you need to have PHP run as a CGI not a web server module.

Another method you can use is the powerful URL rewriting module in Apache. A request to http://www.example.com/user/ gets rewritten to http://user.example.com/ (you can then have a name server running on the server which resolves unknown .example.com addresses to the IP address of the server).
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Apr 20th, 2006, 03:08 PM   #6
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,835
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Apache chroot question... [Unresolved]

__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Apr 27th, 2006, 06:23 PM   #7
Ruku
Fanatic Member
 
Ruku's Avatar
 
Join Date: Jul 02
Location: Canada
Posts: 655
Ruku is an unknown quantity at this point (<10)
Re: Apache chroot question... [Unresolved]

Quote:
Originally Posted by visualAd
thx alot... for now, I can rewrite

mydomain.com/member/member1 (limited subdomains, no wildcard, but .com)

to

member1.mydomain.gotdns.com (wildcard, but .gotdns.com)

it still has the ugly gotdns part... but it's better than nothin'...!

!
__________________

Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
Website: http://DreamForgery.com
Ruku is offline   Reply With Quote
Reply

Go Back   VBForums > Other Languages > PHP


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:02 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.