Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Stop subdomain PHP scripts from accessing main domain files
- Hi, might be a dumb question, but I gave someone subdomain access through FTP. While they can only access their own folder and not any of mine, I realized they could simply have a PHP file that could do anything to my files including delete, make copies, etc. For instance:
- ++++++++++++++
- list of top cheapest host http://Listfreetop.pw
- Top 200 best traffic exchange sites http://Listfreetop.pw
- free link exchange sites list http://Listfreetop.pw
- list of top ptc sites
- list of top ptp sites
- Listfreetop.pw
- Listfreetop.pw
- +++++++++++++++
- copy("…/file", "file");
- If they make a PHP file in their folder that does that, it will copy over whatever file they choose in my domain to their folder. Or they could do things like unlink(), etc I realized.
- Is there a way to stop this script access the subdomain has to my entire site?
- You need to run the 2 sites under different users and the site content need to have the correct permissions set. In a normal cpanel server for example, this is not possible without creating 2 cpanel accounts. I ususally recommend that you not put too many domains/sites under one account since it can be a nightmare to sort out if you get hacked. Also I recommend you put important sites in their own accounts.
- Hi, thanks for the info. So, basically the safest way would be to pay for a 2nd hosting account for that domain?
- Correct. To isolate the sites they need to be using different users at the server / system level and usually that requires two separate hosting accounts. If you have multiple sites that you want in this setup, a reseller account would work and just ignore the reselling features.
- -Steven | u2-web@Cooini, LLC - Business Shared Hosting | Isolate sites with Webspaces | Site Builder | PHP-FPM | MariaDB
- The most secure way is to divide the sites and scripts to different users. But be sure that files of the main domain aren't used by subdomain or the scripts you are talking about.
- I second this, they need to be separate cPanel users not FTP users etc.
- The subdomain and the primary domain separation by user is the easiest way in your case
- - Leave the main domain with user A.
- make money zazzle
- hosting 90
- www.pickalifestyle.com
- l'unite hosting
- i host you
- hosting 1st thanksgiving
- zedclick.com
- - Create user B.
- - Transfer the subdomain to user B. Remember to change the owner of the subdomain files to owner B.
- Thus, you will not only provide the necessary access to certain files, but also increase the security of all sites. If all sites will be located at one user and one of the sites will be hacked you are likely to have problems on all sites, which makes it difficult to clean up viruses.
- https://foxcloud.net/ Data center solutions
- Virtual Hosting, VPS, Dedicated servers, Cloud storage, Public Cloud (IaaS)
Advertisement
Add Comment
Please, Sign In to add comment