SoftException UID is smaller than min_uid Scott MitchellUpdated on August 16, 2021 2 Minute Read 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 Share this Article Related Articles Use rsync to transfer files How to Generate SSH Keys and Set Up SSH Key Authentication How to Connect to Your Server with SSH How to SSH Into Your Shared/Reseller Server SSH Commands: The Practical Guide for Developers and Site Owners How to Use SCP For Secure File Transfer A Complete SSH Tutorial for Beginners How to Connect to Your Server via SSH How to View MariaDB Databases Using the Command Line How to Add SSH Keys to Your GitHub Account