Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

After installing FCGI, unable to upload files with owner:owner and 777

Discussion in 'EasyApache' started by luigidelgado, May 5, 2017.

Tags:
  1. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    117
    Likes Received:
    5
    Trophy Points:
    68
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Couldn't find this issue before here in the groups.

    I am preparing the server for cloudlinux so I changed de EA4 profile to the cPanel default one. To avoid having CGI as the default handler I installed FCGI. (using cPanel documentation).

    Everything went fine, all sites were working ok. But then we realized no account could upload files through their CMS (wordpress) /via Web. So we tested by changing the uploading folder permissions to 777 (which is a bad idea) but they couldn't still upload files.

    We checked owners, groups, permissions, everything looks fine. We were using DSO+Ruid2 before that. In one account we noted the group was nobody but even after changing it to the respective owner the problem remained.

    We then tried to run a script like Softacullous to install a CMS. And the application will work fine and will allow users to upload files. Again: users, groups, permissions were identical in the installed by Softacullous and the previuosly installed accounts. Still only the new installed app will be allowed to upload files.

    I then noted that one user that had PHP-FPM enabled in his web site / account was able to upload files without any issue. So we went ahead and enabled PHP-FPM to all accounts and the issue was "solved". But now all sites have to be running with PHP-FPM, if I disable it, the issue will come back.

    What am I missing?

    Steps to reproduce:
    1. Ran EA4 to install the Default cPanel Profile
    2. To avoid using CGI I installed FCGI as the handler according to cPanel Documentation
    3. No user is able to upload files via web / via their CMS (Wordpress), not with 755 or 775 or 777 folder permission. Checked permissions, owners and groups, everything seems to be fine.
    4. If I use a script like softaculous to install and run an application, that application will be able to upload files without an issue. The others won't.
    5. If I enable PHP-FPM for an account, that account will now be able to upload files and work without any issues.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Is the suEXEC RPM installed on this system? You can check with a command such as:

    Code:
    rpm -qa | grep -i suexec
    If not, you can install it via the following command:

    Code:
    yum install ea-apache24-mod_suexec
    If you install it, suEXEC executes PHP scripts as the user who owns the VirtualHost that serves the request. If you disable suEXEC, the system serves PHP requests as the nobody system user.

    Thank you.
     
  3. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    117
    Likes Received:
    5
    Trophy Points:
    68
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great looks like ti worked. Just a caveat: As I am running the experimental Repo to install FCGI I had to do this:

    Code:
    yum --disablerepo="*" --enablerepo="EA4" install ea-apache24-mod_suexec

    Question: If enabling Experimental Repo, will cPanel updates run the yum updates from this repo or will it continue updating from EA4 standar repo?
     
    #3 luigidelgado, May 5, 2017
    Last edited: May 5, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, the "yum update" command will include updates from the EA4 Experimental Repo if it's enabled. However, note that the experimental repo doesn't typically provide experimental RPMS for existing packages. Instead, it's generally utilized for new features. You can read more about the Experimental Repo for EA4 at:

    The Experimental Repository - EasyApache 4 - cPanel Documentation

    Thank you.
     
    luigidelgado likes this.
  5. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    117
    Likes Received:
    5
    Trophy Points:
    68
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Will this work to disable it from being used when updating with automatic cpupd?:
    Code:
    yum-config-manager --disable "EA4-experimental"
    When installing the SuEXEC module, I yum updated several other modules and used the Experimental Repo so I had to rollback that and disabled it and then installed it again as mentioned in comment #3 above. But I want to be sure I am not using any other module from Experimental but FCGI.
     
    #5 luigidelgado, May 5, 2017
    Last edited: May 6, 2017
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    That command should disable the EA4 Experimental Repo, yes. You should see the following line in the EA4-experimental.repo file within the /etc/yum.repos.d/ directory after running that command:

    Code:
    enabled=0
    Thank you.
     
Loading...

Share This Page