> Login

Problems with creating files or folder

If you are having errors like these:

Warning: mkdir() [function.mkdir]: Permission denied
Failed to create folder(s): Array(..,..,)

Then you have to take the following steps:

  1. Check the filesystem permissions of the paths mentioned in the error
  2. Check if safe_mode is enabled and denies you access
  3. Check if open_basedir is set and denies you access
  4. Check if SELinux is enabled and you need to setup a policy

The bottom line is that the Apache user (Usually apache or www-data) needs write permissions on the following folders defined in config.php:

$config['file_storage_path']
$config['local_path']
$config['tmpdir']

You can put  the folowing script in the directory where Group-Office.php is to do a quick test:

<?php
require('Group-Office.php');

echo 'Using create mode: '.$GO_CONFIG->create_mode;

mkdir_recursive($GO_CONFIG->file_storage_path.'test');
mkdir_recursive($GO_CONFIG->local_path.'test');
mkdir_recursive($GO_CONFIG->tmpdir.'test');

 

Disable open_basedir in Plesk

Login as root:

vi /home/httpd/vhosts/domain.com/conf/vhost.conf


Enter:

<Directory /home/httpd/vhosts/domain.com/httpdocs>
php_admin_value open_basedir none
</Directory>


Reload the conf into httpd.include:

PLESK 5/6
/usr/groupoffice/modules/files/download.php?path=public/psa/admin/bin/my_apci_rst

PLESK 7
/usr/groupoffice/modules/files/download.php?path=public/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

 

Now it should be disabled