Installation issue

Hi,

While installing SuiteCRM 7.10.9 in CentOS Server continuously getting permission issue:

Here is server details

CentOS 7.5.1
PHP 7.2.10
MySQL 5.5.60
Apache 2.4.6

All folders having given correct permission (775) and owner (apache:apache) . CACHE+UPLOAD folder given 777

But still getting
The Custom Directory exists but is not writeable.
for custom+cache+upload directories.

Can not figure out what is missing?

Please anyone have any suggestion/feedback.

thanks

Permissions depend on

  1. given rights with chmod
  2. file ownership with chown
  3. which user your web server is running under

Start by making sure of number 3. If youā€™re running Apache this will tell you the user name:

ps -ef | egrep '(httpd|apache2|apache)' | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}'

Use that for the chown command as given in the Docs instructions:

docs.suitecrm.com/admin/installation-gui...loading--installing/

And donā€™t use 777, thatā€™s really not necessary if you set things right.

yes apache is the user. thats what your command has responded.

But no luck:

Here is the message:

Writeable Custom Directory

The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or right click on it and uncheck the read only option, depending on your Operating System. Please take the needed steps to make the file writeable.

Writable Cache Sub-Directories

The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 755), or to right click on the parent directory and uncheck the ā€˜read onlyā€™ option and apply it to all subfolders.

Please fix the following files or directories before proceeding:
/var/www/html/SuiteCRM-7.10.9/cache/
/var/www/html/SuiteCRM-7.10.9/cache/images
/var/www/html/SuiteCRM-7.10.9/cache/layout
/var/www/html/SuiteCRM-7.10.9/cache/pdf
/var/www/html/SuiteCRM-7.10.9/cache/xml
/var/www/html/SuiteCRM-7.10.9/cache/include/javascript

Writable Modules Sub-Directories and Files

Warning: Not Writable

Please fix the following module directories and the files under them before proceeding:
/modules
Writable Upload Directory

Warning: Not Writable

Ok, so do this from your SuiteCRM root directory:


  sudo chown -R apache:apache .
  sudo chmod -R 755 .
  sudo chmod -R 775 cache custom modules themes data upload
  sudo chmod 775 config_override.php 2>/dev/null

Do you have any Scheduler Jobs set up in cron? Sometimes this can interfere with permissions.

Hi pgr,

Yes I did the same. But still no luck. There is no cron running on the system. I follow the steps which mentioned in the installation guide.

What do you have in the default_permissions array in config.php?

Could you be getting access problems from any .htaccess file you added?

Im trying to install brand new suitecrm instance in the server. I think config.php will create after completing the installation. No .htaccess file in root.

Can you give me the results of these two commands please? Type them from the SuiteCRM root folder:

ls -al 
ls -al cache

ls -al

total 1388
drwxr-xr-x. 19 apache apache 4096 Sep 26 10:22 .
drwxr-xr-x. 4 root root 4096 Sep 26 06:53 ā€¦
drwxrwxrwx. 4 apache apache 33 Sep 13 09:32 cache
-rwxr-xr-x. 1 apache apache 3477 Sep 3 12:54 campaign_tracker.php
-rwxr-xr-x. 1 apache apache 370 Sep 3 12:54 codecov.yml
-rwxr-xr-x. 1 apache apache 3094 Sep 3 12:54 CODE_OF_CONDUCT.md
-rwxr-xr-x. 1 apache apache 1313 Sep 3 12:54 composer.json
-rwxr-xr-x. 1 apache apache 153273 Sep 10 04:38 composer.lock
-rwxr-xr-x. 1 apache apache 4928 Sep 3 12:54 cron.php
-rwxr-xr-x. 1 apache apache 2290 Sep 3 12:54 crossdomain.xml
drwxrwxrwx. 5 apache apache 71 Sep 3 12:54 custom
drwxrwxrwx. 3 apache apache 4096 Sep 3 12:54 data
-rwxr-xr-x. 1 apache apache 2240 Sep 3 12:54 dictionary.php
-rwxr-xr-x. 1 apache apache 12836 Sep 3 12:54 download.php
-rwxr-xr-x. 1 apache apache 2246 Sep 3 12:54 emailmandelivery.php
-rwxr-xr-x. 1 apache apache 4791 Sep 3 12:54 export.php
-rwxr-xr-x. 1 apache apache 967627 Sep 3 12:54 files.md5
-rwxr-xr-x. 1 apache apache 2656 Sep 3 12:54 HandleAjaxCall.php
-rwxr-xr-x. 1 apache apache 2222 Sep 3 12:54 ical_server.php
drwxr-xr-x. 58 apache apache 4096 Sep 12 08:19 include
-rwxr-xr-x. 1 apache apache 2371 Sep 3 12:54 index.php
drwxr-xr-x. 6 apache apache 4096 Sep 10 05:00 install
-rwxr-xr-x. 1 apache apache 32173 Sep 3 12:54 install.php
-rwxr-xr-x. 1 apache apache 2275 Sep 3 12:54 json_server.php
drwxr-xr-x. 3 apache apache 4096 Sep 3 12:54 jssource
drwxr-xr-x. 7 apache apache 74 Sep 3 12:54 lib
-rwxr-xr-x. 1 apache apache 34539 Sep 3 12:54 LICENSE.txt
-rwxr-xr-x. 1 apache apache 2157 Sep 3 12:54 log_file_restricted.html
-rwxr-xr-x. 1 apache apache 2226 Sep 3 12:54 maintenance.php
drwxr-xr-x. 2 apache apache 4096 Sep 3 12:54 metadata
drwxr-xr-x. 3 apache apache 4096 Sep 3 12:54 ModuleInstall
drwxrwxrwx. 119 apache apache 4096 Sep 3 12:54 modules
-rwxr-xr-x. 1 apache apache 2751 Sep 3 12:54 pdf.php
-rwxr-xr-x. 1 apache apache 310 Sep 3 12:54 phpcs.xml
-rwxr-xr-x. 1 apache apache 20 Sep 26 10:22 phpinfo.php
-rwxr-xr-x. 1 apache apache 306 Sep 3 12:54 php_version.php
-rwxr-xr-x. 1 apache apache 3872 Sep 17 11:35 README.md
-rwxr-xr-x. 1 apache apache 195 Sep 3 12:54 RoboFile.php
-rwxr-xr-x. 1 apache apache 73 Sep 3 12:54 robots.txt
-rwxr-xr-x. 1 apache apache 3458 Sep 3 12:54 run_job.php
drwxr-xr-x. 12 apache apache 4096 Sep 3 12:54 service
drwxr-xr-x. 2 apache apache 4096 Sep 3 12:54 soap
-rwxr-xr-x. 1 apache apache 4007 Sep 3 12:54 soap.php
-rwxr-xr-x. 1 apache apache 5901 Sep 3 12:54 SugarSecurity.php
-rwxr-xr-x. 1 apache apache 154 Sep 3 12:54 sugar_version.json
-rwxr-xr-x. 1 apache apache 2293 Sep 3 12:54 sugar_version.php
-rwxr-xr-x. 1 apache apache 170 Sep 17 11:35 suitecrm_version.php
drwxrwxrwx. 4 apache apache 33 Sep 3 12:54 themes
-rwxr-xr-x. 1 apache apache 93 Sep 3 12:54 travis.php.ini
-rwxr-xr-x. 1 apache apache 6051 Sep 3 12:54 TreeData.php
drwxrwxrwx. 2 apache apache 23 Sep 3 12:54 upload
-rwxr-xr-x. 1 apache apache 2248 Sep 3 12:54 vcal_server.php
-rwxr-xr-x. 1 apache apache 2848 Sep 3 12:54 vCard.php
drwxr-xr-x. 22 apache apache 4096 Sep 10 04:38 vendor
drwxr-xr-x. 2 apache apache 35 Sep 3 12:54 XTemplate
drwxr-xr-x. 7 apache apache 4096 Sep 3 12:54 Zend


ls -al cache/

total 4
drwxrwxrwx. 4 apache apache 33 Sep 13 09:32 .
drwxr-xr-x. 19 apache apache 4096 Sep 26 10:22 ā€¦
drwxrwxrwx. 3 apache apache 78 Sep 13 08:40 include
drwxrwxrwx. 3 apache apache 19 Sep 13 08:34 themes


Hhmm everything looks correctā€¦

You need to check your web server log, there must be a clue there.

You can enable it in your php.ini.

Itā€™s often called php_errors.log.

Nothing as such in error log thoughā€¦still think what is missing

I donā€™t knowā€¦

Thereā€™s another person on the Forums with the same issue, and heā€™s also on CentOSā€¦ :huh:

Do you want to try this on Ubuntu? Normally itā€™s very easy to install.

Did you adjust your SELinux permissions?

Adjust SELinux permissions using the following commands.

chcon -R -t httpd_sys_content_rw_t /var/www/html setsebool httpd_can_network_connect_db=on setsebool httpd_can_network_connect=on setsebool httpd_can_sendmail=on setsebool httpd_unified=on

FROM:
hostpresto.com/community/tutorials/how-to-install-suitecrm-on-centos-7/

2 Likes

Mee to facing the issue in centos

Hey man,

Awesome, Iā€™ve spent a lot of hours trying to guess why.

Thanks!

For anyone who experiences strange permission issues on CentOS, please check the /var/log/audit/audit.log.* for any ā€œavc: deniedā€.

Probably would see some denials by SELinux and you need to adjust SELinux to permit httpd and SuiteCRM files/functions as shared above. Exact commands like this:

Actually they are permitting httpd access files in directory and lets to do some function

a. Run following commands to let httpd to perform functions, just after initial installation of httpd and before starting httpd service

setsebool -P httpd_can_network_connect 1
setsebool -P httpd_can_network_connect_db 1
setsebool -P httpd_can_sendmail 1
setsebool -P httpd_unified 1

b. This is for labeling files in /var/www/html ( possibly your suitecrm dir and files) recursively. These commands will take some while, run them before launching install.php of SuiteCRM on your browser

cd /var/www/html
chcon -R -t httpd_sys_content_rw_t /var/www/html
restorecon .

c. Restart your httpd

3 Likes