Cannot Create Web Form Due to Permissions

I’m trying to setup a custom webform and I’m not having much luck saving it. I keep seeing a 403 error message saying I don’t have permission, which doesn’t make sense to me because I’m logged in as admin. I’m fairly certain some file(s) is set to the wrong permission, but I’m not entirely sure what file(s) I need to be modified.

I’m searched for other threads and they all seem to point to the config.php file and/or changing the permission levels for every folder and file to 777 or 775. That seems a bit extreme to me, but I could be wrong.

Config.php shows the following

array (
‘dir_mode’ => 493,
‘file_mode’ => 420,
‘user’ => ‘’,
‘group’ => ‘’,

I have no idea if user and group are supposed to be blank or even if I’m changing the correct file. I just really want to able to save the file so I can link it to an external html page. That page is working fine, but it’s not updating my Leads, so I assume it’s because I didn’t save the form.

Would somebody please point me in the right direction about how I might be able to fix this?

Yes we need to fix your ownerships/permissions.

for this, the first thing to determine is which user your web server is running under.

Tell me what you see in the instructions in Admin / Schedulers, at the bottom, below the list. This will let me know the user name.

I see the following

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

          • cd /home/medindwq/subdomain.domain.com; php -f cron.php > /dev/null 2>&1
            

It looks like your web server user is “medindwq”, let’s try to use that for permissions.

For precaution, first run this command from your suiteCRM root directory (I suppose it’s /home/medindwq/subdomain.domain.com) and SAVE the results somewhere:

ls -al

This should list the SuiteCRM directory with ownerships (users/groups). If we need to set permissions back to how it was, we can use this information.

Now do


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

And in config.php:


  'default_permissions' =>
  array (
    'dir_mode' => 1528,
    'file_mode' => 493,
    'user' => '',
    'group' => '',
  ),

This should work well, you might prefer to add the “medindwq” user and group there too, but in my install I have those values empty and it runs just fine.

1 Like

Thanks for the help, I really appreciate it.

The issue is that I installed SuiteCrm on a subdomain, via my Namecheap Cpanel, and for some odd reason I’m not able to use a lot of linux commands. No idea why. My guess is some annoying security measure in place. I’m gonna have to email their support because a lot of the linux commands I’m not able to use and WinSCP isn’t helping much.

I was hoping to avoid setting up a standalone Ubuntu server because I really didn’t want to deal with setting up SSL, but it appears that might be the direction I have to go.

SSL is easier now that it was before, thanks to Let’s Encrypt (and it’s free).

It’s well worth the trouble, having proper access to your SuiteCRM installation. I would never use SuiteCRM for any real-world company if I couldn’t access my server completely, it makes troubleshooting a nightmare.