SoftException UID is smaller than min_uid

When working with SSH (shell) there are various things you can do, among the simplest is creating and editing files that are in use on your hosting account. There can be times when you run across issues in the WHM or cPanel GUI after working within the shell. In this article, you will learn about the SoftException UID is smaller than min_uid error.

What is the error?

This particular error occurs more often than others when you are trying to edit a file in the GUI. The error you receive when attempting to save the file is similar to the one below:

SoftException in Application.cpp:357: UID of script “/home/mysite/public_html/index.php” is smaller than min_uid Premature end of script headers: index.php

What causes the error?

This error is caused by creating a file within the shell when logged in as the root user. If you check out the list of files, you will see that the index.php file is owned by root where the others are owned by the cpanel user.

drwxr-x—  4  user123 nobody  4.0K May 10 14:19 ./
drwx–x–x 11  user123 user123 4.0K May 10 14:19 ../
drwxr-xr-x  2  user123 user123 4.0K May 10 14:04 cgi-bin/
-rw-r–r–  1  user123 user123    0 May 10 14:05 .htaccess
-rw-r–r–  1  root    root    3.0K Aug 27  2009 index.php
-rw-r–r–  1  user123 user123  39K May 10 14:05 php.ini

How can I fix it?

To fix the error, you need to change the ownership of the file to the cpanel username. You can do that by using the following command. Be sure to change the user123 to the proper cpanel username and index.php to the specific file you are going to change.

chown user123:user123 index.php

After running the command, you can check the ownership of the files by running ls -lah command for the resident folder of the files. It should appear as below:

drwxr-x—  4 user123 nobody  4.0K May 10 14:19 ./
drwx–x–x 11 user123 user123 4.0K May 10 14:19 ../
drwxr-xr-x  2 user123 user123 4.0K May 10 14:04 cgi-bin/
-rw-r–r–  1 user123 user123    0 May 10 14:05 .htaccess
-rw-r–r–  1 user123 user123 3.0K Aug 27  2009 index.php
-rw-r–r–  1 user123 user123  39K May 10 14:05 php.ini

11 thoughts on “SoftException UID is smaller than min_uid

  1. Is there other solution for this error? I contacted my hosting and this operation (chown user123.user123 /home/httpd/html/index.php) is not allowed because I have a share hosting.

    1. Hello Andreza,

      This article requires that you have access to SSH and be able to make a change to the file. If you are unable to make that change, then you will need to speak with your host’s support staff and find out if it’s possible for them to make the change for you. If they can’t, then you will need to ask them about your error and whether it’s something they can resolve for you.

      Regards,
      Arnel C.

  2. Hi,

     

    I do not know where the file index.php is located. I’m using Filezila. Is it in the public_html? The error here is:

    Internal Server Error

    UID of script “/home/httpd/html/index.php” is smaller than min_uid


    suPHP 0.6.3
     
     
    1. Hello Andreza,

      The path to the file is within the error message itself. The file should be located at “/home/httpd/html”

      Kindest Regards,
      Scott M

  3. Hi Jacob,

    I’m not using cpanel. I’m using a control painel, but it is not cpanel.

    The url I’m trying to acess is:

    I dont understand why the index.php (mentioned in the error) is in the path /home/httpd/html

    1. Hello Andreza,

      It seems that the server you’re running your website on has the DocumentRoot for your site set to the /home/httpd/html directory.

      As such, any file you try to access on your domain is going to attempt to be pulled from that directory.

      If you have access to the server your website resides on, can you pull up a directory listing of that folder? It should look something similar to our example above of:

      drwxr-x---  4  user123 nobody  4.0K May 10 14:19 ./
      drwx--x--x 11  user123 user123 4.0K May 10 14:19 ../
      drwxr-xr-x  2  user123 user123 4.0K May 10 14:04 cgi-bin/
      -rw-r--r--  1  user123 user123    0 May 10 14:05 .htaccess
      -rw-r--r--  1  root    root    3.0K Aug 27  2009 index.php
      -rw-r--r--  1  user123 user123  39K May 10 14:05 php.ini
      

      In this case you can see that I’ve highlighted the index.php file, and you can see that it’s owned by the user and group root.

      So if I tried to access the index.php script as is, I’d get the same error as you. Instead if you were to run this if your website user was user123:

      chown user123.user123 /home/httpd/html/index.php

      Then you should notice that the file listing for that file changes to:

      -rw-r--r--  1  user123    user123    3.0K Aug 27  2009 index.php

      You should then be able to access that script directly from your website without an issue. If you don’t have access to the server or from your control panel to change the owner of files, then you would need to contact your web host to do this for you.

      – Jacob

    1. Hello Andreza,

      Yes the cPanel user name will typically be the same as the main FTP user name for an account, if you are in fact using cPanel.

      What URL are you trying to access that it is trying to pull files from /home/httpd/html?

      On our servers for instance, if your cPanel user name was userna5 the server would attempt to serve your files from /home/userna5/public_html

      – Jacob

    1. Hello Andreza,

      You will run that command from whichever program you are using for shell access. The safest place would be from within the directory where the file is located.

      Kindest Regards,
      Scott M

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+