Please add file permission instructions via FTP to documentation

Hi,

For those who don’t use command line, is it possible to add FTP instruction for file permissions to files and folders, using only FTP?
Added to this document - https://docs.suitecrm.com/admin/installation-guide/downloading-installing]https://docs.suitecrm.com/admin/installation-guide/downloading-installing

Many thanks

I wouldn’t recommend running SuiteCRM without command-line access. It’s something that many hosting already provide, even cheap, entry-level ones, and you can make good use of the command-line, not just for permissions, but many other things.

I definitely would never accept administering a SuiteCRM instance without SSH access…

But about your request - are you talking about command-line FTP or using an FTP client like Filezilla? We can’t possibly provide instructions for all of them…

Thank you for the fast reply Karma. I will see what I can do about learning command line.

In our case, yes, it is for FileZilla. Perhaps if trusted forum users could contribute to your documentation, it might take the burden off your shoulders? I know I would contribute at a later date as I become more known here.

We can find tutorials on how to change file permissions via Filezilla everywhere. Here for example:

https://www.pickaweb.co.uk/kb/change-file-folder-permissions-using-filezilla/

Thanks,

AlxGr

Thanks Karma, I know how to change the permissions but when translating the command lines, one is not sure -R means all the files AND folders or just the files.
I actually did the command line instructions on the phone with my ISP, so they did it for me and still, there seems to be problems with the layouts of Suite and the JS files not working properly.

So ideally, if there were just some clearer instructions in translating what needs to be done if you are doing it in FTP, that would be great.

Example:

sudo chown -R www-data:www-data . - my ISP said we did not have to do anything with this line
sudo chmod -R 755 . - does this line mean change all files and folder’s permissions to 755 recursively?
sudo chmod -R 775 cache custom modules themes data upload - Once the above is done, the, recursively change all these folders (and their child folders) to 775
sudo chmod 775 config_override.php 2>/dev/null - and lastly, change config_override.php. And what does 2>/dev/null mean?

I hope that makes sense? I just think if it were documented a little better for people who don’t use command line, it might help.

Cheers

You got it mostly right :slight_smile:

sudo chown -R www-data:www-data .

Recursively sets file and folder ownership to the user www-data (should match the user under which your web server is running)

sudo chmod -R 755 . 

Changes all files and folder’s permissions to 755 recursively

sudo chmod -R 775 cache custom modules themes data upload 

Once the above is done, the, recursively change all these folders (and their child folders) to 775

sudo chmod 775 config_override.php 2>/dev/null 

The same for config_override.php. Since this file doesn’t exist on new installations, this will be effective only for people re-setting permissions at a later moment. That 2>/dev/null just redirects the eventual error (if the file doesn’t exist yet) so that people don’t worry about it.

For your problems, please edit your config.php, in the default_permissions part, to include your web server user name and group, and set permissions.


        'default_permissions' => array(
            'dir_mode' => 02770,
            'file_mode' => 0755,
            'user' => 'your_web_server_user',
            'group' => 'your_web_server_group',
        ),

Now run a Quick Repair and Rebuild and hit ctrl-F5 on your browser to ask for a full refresh.

If “undefined” problems subsist, you might be getting blocked by your .htaccess file… did you edit it?

Thank you pgr, as always! :slight_smile:

You’re a scholar and a gent!

1 Like

Hi PGR,

What is the “your_web_server_user” and “your_web_server_group” I am meant to be adding?

Many thanks

Can you run this command in the root of your SuiteCRM installation and post the results here?

ls -al

Also (sorry if I’ve asked you this before, I don’t remember) copy the instructions that appear in Admin / Schedulers, at the bottom, so I can have a look at them.

Thanks

sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 2226 Aug 26 14:01 maintenance.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxr-xr-x 2 sftefdjgmtc users 4096 Aug 26 16:17 metadata
-bash: drwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxrwxr-x 120 sftefdjgmtc users 4096 Sep 18 18:28 modules
-bash: drwxrwxr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 2751 Aug 26 14:01 pdf.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 306 Aug 26 14:01 php_version.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 73 Aug 26 14:01 robots.txt
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 3458 Aug 26 14:01 run_job.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxr-xr-x 12 sftefdjgmtc users 4096 Aug 26 16:17 service
-bash: drwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxr-xr-x 2 sftefdjgmtc users 4096 Aug 26 16:17 soap
-bash: drwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 4007 Aug 26 14:01 soap.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 154 Aug 26 14:01 sugar_version.json
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 2293 Aug 26 14:01 sugar_version.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 23692 Oct 10 18:16 suitecrm.log
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 165 Aug 26 14:01 suitecrm_version.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxrwxr-x 4 sftefdjgmtc users 4096 Aug 26 16:17 themes
-bash: drwxrwxr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 490 Sep 21 19:35 upgradeWizard.log
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxrwxr-x 5 sftefdjgmtc users 4096 Oct 9 17:13 upload
-bash: drwxrwxr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 2686 Aug 26 14:01 vCard.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ -rwxr-xr-x 1 sftefdjgmtc users 2248 Aug 26 14:01 vcal_server.php
-bash: -rwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ drwxr-xr-x 37 sftefdjgmtc users 4096 Aug 26 16:17 vendor
-bash: drwxr-xr-x: command not found
sftefdjgmtc@comp305:~/public_html/help.example.com$ clear
sftefdjgmtc@comp305:~/public_html/help.example.com$ ls -al
total 1760
drwxr-xr-x 20 sftefdjgmtc users 4096 Oct 9 19:55 .
drwx—r-x 16 sftefdjgmtc users 4096 Sep 2 23:00 …
-rwxr-xr-x 1 sftefdjgmtc users 3492 Oct 1 14:43 .htaccess
-rwxr-xr-x 1 sftefdjgmtc users 1292 Aug 26 14:01 .php_cs.dist
drwxr-xr-x 5 sftefdjgmtc users 4096 Aug 26 16:17 Api
-rwxr-xr-x 1 sftefdjgmtc users 3094 Aug 26 14:01 CODE_OF_CONDUCT.md
-rwxr-xr-x 1 sftefdjgmtc users 2656 Aug 26 14:01 HandleAjaxCall.php
-rwxr-xr-x 1 sftefdjgmtc users 34539 Aug 26 14:01 LICENSE.txt
drwxr-xr-x 3 sftefdjgmtc users 4096 Aug 26 16:17 ModuleInstall
-rwxr-xr-x 1 sftefdjgmtc users 5317 Aug 26 14:01 README.md
-rwxr-xr-x 1 sftefdjgmtc users 306 Aug 26 14:01 RoboFile.php
-rwxr-xr-x 1 sftefdjgmtc users 5901 Aug 26 14:01 SugarSecurity.php
-rwxr-xr-x 1 sftefdjgmtc users 6051 Aug 26 14:01 TreeData.php
drwxr-xr-x 2 sftefdjgmtc users 4096 Aug 26 16:17 XTemplate
drwxr-xr-x 7 sftefdjgmtc users 4096 Aug 26 16:17 Zend
drwxrwxr-x 15 sftefdjgmtc users 4096 Sep 18 18:28 cache
-rwxr-xr-x 1 sftefdjgmtc users 3477 Aug 26 14:01 campaign_tracker.php
-rwxr-xr-x 1 sftefdjgmtc users 3007 Aug 26 14:01 composer.json
-rwxr-xr-x 1 sftefdjgmtc users 271353 Aug 26 14:01 composer.lock
-rwxr-xr-x 1 sftefdjgmtc users 12748 Oct 9 08:07 config.20191009
-rw-r–r-- 1 sftefdjgmtc sftefdjgmtc 12877 Oct 10 15:11 config.php
-rwxrwxr-x 1 sftefdjgmtc users 1775 Oct 9 19:31 config_override.php
-rwxr-xr-x 1 sftefdjgmtc users 5072 Aug 26 14:01 cron.php
-rwxr-xr-x 1 sftefdjgmtc users 2290 Aug 26 14:01 crossdomain.xml
drwxrwxr-x 10 sftefdjgmtc users 4096 Oct 1 15:48 custom
drwxrwxr-x 3 sftefdjgmtc users 4096 Aug 26 16:17 data
-rwxr-xr-x 1 sftefdjgmtc users 1898 Aug 26 14:01 deprecated.php
-rwxr-xr-x 1 sftefdjgmtc users 2240 Aug 26 14:01 dictionary.php
-rwxr-xr-x 1 sftefdjgmtc users 12983 Aug 26 14:01 download.php
-rwxr-xr-x 1 sftefdjgmtc users 2246 Aug 26 14:01 emailmandelivery.php
-rwxr-xr-x 1 sftefdjgmtc users 4816 Aug 26 14:01 export.php
-rwxr-xr-x 1 sftefdjgmtc users 1118523 Aug 26 14:01 files.md5
-rwxr-xr-x 1 sftefdjgmtc users 38 Sep 2 16:29 find.txt
-rwxr-xr-x 1 sftefdjgmtc users 2222 Aug 26 14:01 ical_server.php
drwxr-xr-x 57 sftefdjgmtc users 4096 Aug 26 16:17 include
-rwxr-xr-x 1 sftefdjgmtc users 2371 Aug 26 14:01 index.php
drwxr-xr-x 6 sftefdjgmtc users 4096 Oct 1 14:42 install
-rwxr-xr-x 1 sftefdjgmtc users 19350 Sep 2 19:48 install.log
-rwxr-xr-x 1 sftefdjgmtc users 32360 Aug 26 14:01 install.php
-rwxr-xr-x 1 sftefdjgmtc users 2275 Aug 26 14:01 json_server.php
drwxr-xr-x 3 sftefdjgmtc users 4096 Aug 26 16:17 jssource
drwxr-xr-x 9 sftefdjgmtc users 4096 Aug 26 16:17 lib
-rwxr-xr-x 1 sftefdjgmtc users 2157 Aug 26 14:01 log_file_restricted.html
-rwxr-xr-x 1 sftefdjgmtc users 2226 Aug 26 14:01 maintenance.php
drwxr-xr-x 2 sftefdjgmtc users 4096 Aug 26 16:17 metadata
drwxrwxr-x 120 sftefdjgmtc users 4096 Sep 18 18:28 modules
-rwxr-xr-x 1 sftefdjgmtc users 2751 Aug 26 14:01 pdf.php
-rwxr-xr-x 1 sftefdjgmtc users 306 Aug 26 14:01 php_version.php
-rwxr-xr-x 1 sftefdjgmtc users 73 Aug 26 14:01 robots.txt
-rwxr-xr-x 1 sftefdjgmtc users 3458 Aug 26 14:01 run_job.php
drwxr-xr-x 12 sftefdjgmtc users 4096 Aug 26 16:17 service
drwxr-xr-x 2 sftefdjgmtc users 4096 Aug 26 16:17 soap
-rwxr-xr-x 1 sftefdjgmtc users 4007 Aug 26 14:01 soap.php
-rwxr-xr-x 1 sftefdjgmtc users 154 Aug 26 14:01 sugar_version.json
-rwxr-xr-x 1 sftefdjgmtc users 2293 Aug 26 14:01 sugar_version.php
-rwxr-xr-x 1 sftefdjgmtc users 23692 Oct 10 18:16 suitecrm.log
-rwxr-xr-x 1 sftefdjgmtc users 165 Aug 26 14:01 suitecrm_version.php
drwxrwxr-x 4 sftefdjgmtc users 4096 Aug 26 16:17 themes
-rwxr-xr-x 1 sftefdjgmtc users 490 Sep 21 19:35 upgradeWizard.log
drwxrwxr-x 5 sftefdjgmtc users 4096 Oct 9 17:13 upload
-rwxr-xr-x 1 sftefdjgmtc users 2686 Aug 26 14:01 vCard.php
-rwxr-xr-x 1 sftefdjgmtc users 2248 Aug 26 14:01 vcal_server.php
drwxr-xr-x 37 sftefdjgmtc users 4096 Aug 26 16:17 vendor
sftefdjgmtc@comp305:~/public_html/help.example.com$

=====================================================================

In order to run SuiteCRM Schedulers, edit your web server user’s crontab file with this command:
sudo crontab -e -u sftefdjgmtc
… and add the following line to the crontab file:

          • cd /usr/www/users/sftefdjgmtc/help.example.com; php -f cron.php > /dev/null 2>&1
            

Thanks PGR

Try “your_web_server_user” as sftefdjgmtc

and “your_web_server_group” as users

Thanks PGR, I tried this but then got the Developer Tools went missing.
I will revert and reset all the permissions again.

Then onto plan C?