简体   繁体   中英

SoftException in Application.cpp:422: Mismatch between target UID (584) and UID (99) of file

I was setting up the Apache on CentOS server. My first testing script index.php as well as any others was causing:

500 Internal Server Error

I opened the log file (in my case /usr/local/apache/logs/error_log and /usr/local/apache/logs/suphp_log) and I found some entries as follows:

SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (32010) of file "/usr/local/apache/htdocs/{DIRECTORY OF MY PROJECT}/index.php"

-AND-

[Wed Feb 11 15:16:03 2015] [warn] UID of script "/usr/local/apache/htdocs/{DIRECTORY OF MY PROJECT}/index.php" is smaller than min_uid

What I understood my fie permissions and/or ownership was wrong. Is there any recommended file ownership for website scripts in CentOS environment?

The easiest solution I found was by using a command line:

chown -R 99:99 {PROJECT ROOT DIRECTORY}

where 99 is the target UID value required by the server.

Alternatively you may use WinSCP. Just right click on the project root directory, select permissions and enter in Group and Owner fields value 99 (the same as target UID from error log), also check box ' Set group, owner and permissions recursively ', click OK and after a while the files and folders ownership should adjusted to the one that is required by the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM