Plesk file permissions - Apache/PHP conflicting with user accounts.

Posted by hfidgen on Server Fault See other posts from Server Fault or by hfidgen
Published on 2010-02-17T12:11:13Z Indexed on 2010/03/30 12:13 UTC
Read the original article Hit count: 438

Hiya,

I'm building a Drupal site which performs various automatic disk operations using the apache user (id=40).

The problem is that the site was set up on a subdomain belonging to user ID 10001 (ie my main FTP account) so the filesystem belongs to that user ID.

So I keep getting errors like this:

warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. 
The script whose uid is 10001 is not allowed to access /var/www/vhosts/domain.com/httpdocs/sites/default/files/images/user owned by uid 48 in /var/www/vhosts/domain.com/httpdocs/includes/file.inc on line 579.

I've tried changing the apache group in httpd.conf to apache:psacln, psacln being the default group for all web users but that's not helped.

The situation now is:

  • ..../files/images/ = 777 and chown = ftplogin:psacln
  • ..../files/images/user = 775 and chown = apache:psacln
  • ..../files/tmp = 777 and chown = ftplogin:psacln

So apparently uid 40 and 10001 both have permissions to write to any of the 3 directories involved, but still can't.

Am i missing something here? Can anyone help?

Thanks!

© Server Fault or respective owner

Related posts about plesk

Related posts about apache