user263096
user263096

Reputation: 135

How to restrict PHP code filesystem operations on shared hosting?

I have multiple sites with different owners on my server. How can I restrict directory PHP code can work in so nobody can access others' files?

The problem is, that I am limited only to cPanel and I don't have any access to httpd.conf. Server is running with lsphp, so I can create different php.ini files for different directories, but I am afraid that they can be easily overwritten with .htaccess's php_value directive I am unable to turn off.

Upvotes: 1

Views: 75

Answers (1)

Lajos Arpad
Lajos Arpad

Reputation: 76464

You will essentially want to restrict filesystem access for users. To achieve this, ideally you could create a separate OS user for each individual owner of a hosting and restrict their access to the specific places where they should have access.

If you are unable to do so, then you can create cPanel hosting accounts as Brad suggested in the comments section.

Upvotes: 1

Related Questions