You do not have access to the requested area/action

Your software
My Mautic version is: v3.0.1
My PHP version is: 7.3.21

Your problem
My problem is: Cannot select any contact source at at campaign builder, the error message is: “You do not have access to the requested area/action”

Please note the user has ‘administrator’ privileges.
Mautic was upgraded from 2.16.3, there was no such issue then.

These errors are showing in the log:
Nothing in:

  • nginx error log
  • php-fpm log
  • mysql log
  • mautic var/log/mautic_prod-[today].php

nginx access log shows 200 ok for

Steps I have tried to fix the problem:

  • looked into all logs I can think of
  • rm -rf var/cache
  • searched this forum
  • googled
  • checked github issues

nginx config:

You got the issue immediately you upgraded from v2.16.3 right, check if the mautic user hasn’t changed to root.

Yes, imediatelly after upgrade. Do you mean linux user running php? No, the user still www-data. I’ve double-checked all directory content is owned by that user/group.

p.s. I am watching this topic but did not receive mail notification about your answer :frowning:

I found an intermediate reason:
mautic\app\bundles\CampaignBundle\Controller\SourceController.php in function newAction I have $sourceType="" despite the value definitely exists in the request:

$this->request looks like this:

### Symfony\Component\HttpFoundation\Request Object
    [attributes] => ...
    [request] => ...
    [query] => Symfony\Component\HttpFoundation\ParameterBag Object
            [parameters:protected] => Array

so query is empty.
Still looking why.

p.s. my nginx redirect rules look like this, are they correct?

 location / {
    try_files $uri $uri/ /index.php$uri$args;

 location ~ .php$ {
   include snippets/fastcgi-php.conf;
   fastcgi_pass unix:/run/php/php7.3-fpm.sock;

 location ~* ^/index.php {
   fastcgi_split_path_info ^(.+.php)(/.+)$;
   fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
   fastcgi_index index.php;

I tested it with simple file:

echo "<pre>".print_r($_GET, 1);

And it looks correct, so the values get lost somewhere in Mautic/Symfony :frowning:

p. p.s. error message is more than misleading :frowning: .