setting permissions on web server

Having trouble installing on a linux vps.

Going through the installation instructions, the below is a little vague for a newbie. Not sure where to enter these commands, and if I do what impact they might have on other things. Any help would be appreciated.

below snipped from the installation guide under “copy suiteCRM files to web server”

Set ownership of the SuiteCRM directory:
    chgrp ApacheUser.ApacheGroup <suitecrmroot> -R recursively sets ownership for root directory to Apache user and group. 
The system user that your web server uses varies depending on your operating system. Common web server users are as follows:
    apache (Linux/Apache)
    nobody (Linux/Apache)
    IUSR_computerName (Windows/IIS) 

If you are unsure how to set your web server user on your operating system, contact your web server host. If you are installing SuiteCRM locally and need assistance, visit our support forums.

Set the following permissions on the SuiteCRM directory(Linux):
    sudo chown -R www-data:www-data .
    sudo chmod -R 755 .
    sudo chmod -R 775 cache custom modules themes data upload config_override.php 

The commands/steps taken to setting permissions differs dependant on your operating system. If you are experiencing issues with setting permissions on your SuiteCRM instance, visit our support forums.

you run the commands from the command line. First make sure you are in the directory that Suite is installed in as you run those commands from root folderyou will change the permissions for all the files on the server, which you definitely do not want to do.

The user that Apache runs as may vary depending on which flavour of linux you have and how your server is set up. I’d run the following command to check

ps aux | egrep ‘(apache|httpd)’

then move into your suite directory
e.g cd /var/www/yousuitedirectorychangeasappropriate

then you need to run the following 3 commands. If the command I gave you to work out your apache user comes back with something other than www-data then change the first command to the correct user

sudo chown -R www-data:www-data .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

Hope that helps.

Thanks for the help so far.

My host added my user ‘BOB’ to the ‘wheel’ group which evidently provides root access.

sudo su -
and my password then grants that access to BOB.

I then messed around for hours trying to figure out where I was, and eventually navigated to my install directory
cd /home was the trick there.
then I could navigate to my install directory: BOB/public_html/suiteCRM

From inside my install directory, I then ran the command you suggested:

ps aux | egrep ‘(apache|httpd)’

and I get a bunch of data I don’t understand on the users

Assuming my apache user was nobody based on the install instructions, I then ran:
sudo chown -R nobody:nobody .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

… and after numerous attempts those actually did ‘something’ once I realized that the ending . is an actual thing that is required and not just a period at the end of a sentence :slight_smile:

Again, sorry I am such a Linux idiot. Never used it before.

Now however, I get a 404 error when I try to launch the installer from my browser.

And, if I try to delete my suiteCRM directory via FTP etc. to try again from a fresh install, I am no longer allowed because I don’t have permission to change/delete files in that directory (using BOB credentials), which was working.

Clearly, I broke something and I still don’t understand what is happening here with setting these permissions.

Can anyone provide any further guidance?


Can anyone provide me with any guidance on this?

Read Here tested on Linux shared host and linux vps

To my eyes looks unrelated, but I will look at my .htaccess file and get back to you all with the results in case it helps others.

Thanks for the reply!

Yeah, no

I don’t even have an .htaccess file in the root directory of suitecrm to tweak.

… but let’s take it back a step.

If I do a clean upload into a new directory and run these commands;

sudo chown -R nobody:nobody .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

I can’t even access install.php any longer. I get a 404 error.
This can’t be correct.

If I set this back to sudo chown -R myrootuser:myrootuser .
It will try to install but fail.

I can’t even test anything else until I get past this. :blink:

Do you upload in the root folder of Apache?Upload SuiteCrm file to your server. When upload completes upload the file from the post I mentioned earlier in the same folder.
Call the the file from your browser like accessing it http://your-host-here/chperms.php. Wait a 10-15 seconds, nothing will be displayed. Then start the installation.

In my case most 404 errors are permission issues.

I’ve installed that chperms.php file on my server, but I can’t call that file either with my directory permissions the way they are.

As soon as a set the ownership of the suitecrm install directory to ‘nobody’, I seem to lock myself out of that directory.

chgrp ApacheUser.ApacheGroup -R

chgrp nobody:nobody /home/bob/public_html/suitecrm -R

Agin, I set this back to the user the rest of my site runs on ‘BOB’, I get the ‘blank screen’ you suggested when I run chperms.php. I can then also start the install, but suitecrm gives me those fatal errors I mentioned earlier. This is presumably because suitecrm does not have enough permissions with my ‘root’ user to install?

I’ve also tried adding BOB to the nobody group. No help there either.

Please, any other suggestions?


Well, I hope it’s not too late.

I got the same problem like you with the 404 error web page. I had placed the SuiteCRM folder into the var/www/ folder.

Then I made something which worked for me:

I placed the SuiteCRM folder into the var/www/html/ path. Then I set the permissions:

chown apache.apache www/var/html/SuiteCRM/ --(To change the owner of the folder SuiteCRM)
cd www/var/html/SuiteCRM/
chown apache.apache * --(To change the owner of all the files within the SuiteCRM folder)
chmod -R 755 SuiteCRM/

Finally, I typed the following url http:///SuiteCRM/install.php

NOTE: You must be sure the install.php file has the right 755 permissions

I hope it works for you also.

Best regards