• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

PHP Problems

A

alfmanuel

Guest
Hi Guys,

have got a new plesk 8.3.2 machine here (on debian) and some issues with my customers.
it's all about the old problem, that php creates files with www-user permissions...

so i ask you, do you change something on your new setups to get the system running or not?

on the old server i changed the server owner (apache user) group to my psacln group and permitted php safe-mode access to group-based.
but this is not the best solution, and i don't know what you recommand.

some tips would be nice.

server: core 2 duo 2*2,4ghz, 2gb ram
os: debian etch with plesk, kaspersky,...

i'm going to host around 500 domains on the machine


thanks from austria
manuel :)
 
thanks for your reply. as the server's users are administrated by another user, it's important that there is not more to do when configuring a domain...

as i know, suphp needs special setup for each domain, doesn't it?
is suphp working good - and not slowing down the connections?


please give me some more information :)

thanks
 
mod_suphp need to be setup for each domain, yes.
but you can put in skeleton the settings and will copy to each domain when is created and will work. in PLESK users/clients cannot modify vhost.conf, only ADMIN (through Power Toys) or root SSH.
Will not slow down the server (more then any other hundreds of security measures :))
 
so what do you think all about, is mod_suphp the correct way or should i use the default configurations?


manuel :)
 
hm i think that this is a problematic solution, as plesk does not automatically update the vhost.conf if the username changes..

will take the standard plesk-configuration :)


best regards
manuel
 
now of ocurse there is no perfect solution, but why should be in the vhost.conf the username? :) Just if you use mod_suphp in paranoic mode with {user} {group}, but on all servers we do not use it.
 
it seems like i don't understand your solution.

i had to do with suphp some time ago. for each vhost i had to enable suphp and enter the user informations (group & ftp-user)

so that uploaded files got the same permissions as php-written files...


so what do you expect it? what does {user} mean?

maybe you could explain it a little bit better, i'm not THE professional with suphp...

best regards
manuel
 
it's all about the old problem, that php creates files with www-user permissions...

Actually I think that you have a lot of softwares like Joomla, Drupal, Gallery sites, where you require to have FTP access to uploaded/created files via PHP scripts. This is why you want to have www-user permission, if I understood correct.
So now, apacha:apache user is not OK.

The solution is to have ftpuser:psacln.
Easy with mod_suphp, you disable mod_suphp on all server from /etc/httpd/conf.d/mod_suphp.conf and enable on each domain one by one (or with Power Toys via PLESK) and also you can add to skeleton to enable it automatically on new sites when are created.
Then you will have all files created like ftpuser:psacln and no more 777 folders requires
 
yeah that's exactly what i need to do... i heard a lot about powertoys, maybe i'll try it on my own server sometimes... on this machine i won't install (as it's not directly mine)

but what do i need, i have to give each domain it's own php.ini? and i think that i have to set the username ftpuser for each domain somewhere or is it intelligent and uses the script owner?

sry for my bad english ;)
 
mod_suphp as is in our HOW To will use automatically domain owner ftp usernames and groups, not need to add to vhost.conf the paranoic mode.
If you do not setup for each domain a php.ini, default will be used globally, but if you ad to one domain, then that will overwrite only those settings for that domain.
So as an example.

/etc/php.ini is the default in this we have memory_limit=8MB
in /var/www/vhosts/mydomain.com/httpdocs/php.ini memory_limit=32MB
For all domains will be 8MB, for that mydomain will be 32MB.

Also my english is not so good :))
 
i unterstand your configuration scheme, but not the user based things..

other questions? do you have got skype or so?
maybe we could chat there (as i love instant messaging)
 
Back
Top