[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Apache2/PHP permissions in ISP environment



Hi there, we are running debian sarge for a virtual hosting box. PHP safe mode is on for all users with a host of other php_admin_values etc. We are running name based virtual hosting for all hosts except SSL hosts which have their own IP... We are using pureftpd for our FTP server, with the u/p in a mysql database and chrooting the users in their dir.

Currently the server runs as the debian default of www-data.www-data.. and the users are all loggin in as www-client(1000).www-data..

So, when PHP creates a file 'test.txt' (www-data.www-data), a script uploaded via FTP 'alterfile.php' (www-clients.www-data) cant change/delete the generated file 'test.txt'.

i have setup the users etc up like that as the users FTP into a directory: /www/www.exmaple.com/, in that dir there are: backups/, htdocs/, logs/, statistics/, ssl/. they can read everything, but only write to htdocs/.

Does anyone have any suggestions on how to get around the above problem?

How do i allow users to create files (with PHP) with the user of www-data, but still restrict some other directorys from writing?

Is this a bad thing in the first place?

Simon



Reply to: