Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been working with SugarCRM Community 6.5 in an Ubuntu 12.04 development environment to do some testing before moving to production. I am using Apache 2, PHP5 and MySQL to run SugarCRM. I have been able to install SugarCRM, but need to access /var/www/sugarcrm/custom/Extension to be able to make some changes to a module using a PHP script. The installation directions I followed required me to change ownership of the SugarCRM files in the sugarcrm folder to www-data, but I kept the group as root. When I try to access the Extension folder in the file GUI in Ubuntu I get a permission denied message: "The folder contents could not be displayed. You do not have the permissions necessary to view the contents of "Extension".

I have done some searching and tried the suggestions in the following post:

Editing files in /var/www

But I am still receiving the same error message, so I changed ownership back to the root group. Apache would not serve up the SugarCRM files without www-data ownership, so I kept ownership to www-data. My file permissions are as follows--

Contents of /var/www:

myuser@ubuntu:/var/www$ list
total 20
drwxrwxr-x  3 www-data www-data 4096 Jul  9 22:03 .
drwxr-xr-x 14 root     root     4096 Jul  9 16:38 ..
-rw-rw-r--  1 www-data www-data  177 Jul  9 16:38 index.html
drwxrwxr-x 19 www-data root     4096 Jul  9 23:06 sugarcrm
-rw-rw-r--  1 www-data www-data   20 Jul  9 18:10 testphp.php

Contents of sugarcrm:

myuser@ubuntu:/var/www/sugarcrm/custom$ list
total 24
drwxrwxr-x  5 www-data root 4096 Jul  9 23:14 .
drwxrwxr-x 19 www-data root 4096 Jul  9 23:06 ..
drwxrws---  3 www-data root 4096 Jul  9 23:14 application
drwxrws---  3 www-data root 4096 Jul  9 23:14 Extension
-rw-rw-r--  1 www-data root   55 Jun 21 01:01 index.html
drwxrws---  9 www-data root 4096 Jul  9 23:14 modules

Should I be applying these changes to /var/www/ instead of just the sugarcrm files?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Just add yourself to the www-data group

sudo usermod -aG www-data <USERNAME>

and set the user and group to www-data on the sugarcrm folder

sudo chown www-data:www-data <FOLDER>

then chmod it

sudo chmod u=rX,g=rwX,o=rX <FOLDER>

and then do the folders that sugar needs to be able to write to

sudo chmod u+w <FOLDER> <OTHER FOLDER\> <...>

you may have to log out and back in for this to take effect

share|improve this answer
    
That certainly did the trick. Many thanks! –  Sandwich Heat Jul 30 '13 at 16:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.