The Little Guy Posted December 20, 2007 Share Posted December 20, 2007 I just bought a domain, I want to host sub domains, where users sign up, and register a sub domain with us/me. I want to allow people to use PHP on their account, but I don't want people to be able to leave their root directory. the file structure would look like so: hostbox.us | +-- users | +-- user1 | +-- user2 | +-- user3 So... what is a safe way so that user1 cannot access user2's files? using include('../user2/myfile.php'); Quote Link to comment https://forums.phpfreaks.com/topic/82586-user-access/ Share on other sites More sharing options...
dbillings Posted December 20, 2007 Share Posted December 20, 2007 Not so much a PHP issue but an Apache (assuming you're using Apache) issue. Quote Link to comment https://forums.phpfreaks.com/topic/82586-user-access/#findComment-419831 Share on other sites More sharing options...
The Little Guy Posted December 20, 2007 Author Share Posted December 20, 2007 could I do: <?php ini_set("safe_mode_include_dir","/dir/name"); ?> I was reading: With safe mode turned on, you can specify which directories are searched for files with the safe_mode_include_dir variable. Quote Link to comment https://forums.phpfreaks.com/topic/82586-user-access/#findComment-419855 Share on other sites More sharing options...
trq Posted December 20, 2007 Share Posted December 20, 2007 I just bought a domain, A domain has nothing to do with what your asking. What kind of hosting do you have? You'll pretty much need either vps or dedicated to be able to do what you want. Quote Link to comment https://forums.phpfreaks.com/topic/82586-user-access/#findComment-419878 Share on other sites More sharing options...
The Little Guy Posted December 20, 2007 Author Share Posted December 20, 2007 I know it has nothing, I was just putting that out there.. I have a flexable web host. I can edit the ini files if I want, add my own services. I just don't want to allow other members to have access to other directories other than their own. Quote Link to comment https://forums.phpfreaks.com/topic/82586-user-access/#findComment-419888 Share on other sites More sharing options...
trq Posted December 20, 2007 Share Posted December 20, 2007 I just don't want to allow other members to have access to other directories other than their own. The only way you can really do this is to give each client a seperate virtualhost. On any sort of shared hosting, your clients will all share the same document root (yours). Quote Link to comment https://forums.phpfreaks.com/topic/82586-user-access/#findComment-419897 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.