php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67082 posix_seteuid does not set the real id
Submitted: 2014-04-15 23:47 UTC Modified: 2016-12-14 17:33 UTC
From: john at etailz dot com Assigned: leigh (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: john at etailz dot com
New email:
PHP Version: OS:

 

 [2014-04-15 23:47 UTC] john at etailz dot com
Description:
------------
---
From manual page: http://www.php.net/function.posix-seteuid
---

The docs state posix_seteuid sets the real user id of the process. It does not. It sets the effective user id.

Test script:
---------------
		echo "	Setting UID to ".UID."\n";
		echo " USER ID ".posix_getuid()."\n";
		echo " USER ID ".posix_geteuid()."\n";
		if(posix_seteuid(UID)){
			echo "		Successfully set the UID\n";
		} else {
			echo "		Setting UID failed\n";
		}
		echo " USER ID ".posix_getuid()."\n";
		echo " USER ID ".posix_geteuid()."\n";


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-14 17:33 UTC] leigh@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: leigh
 [2016-12-14 17:33 UTC] leigh@php.net
Updated docs to reflect the importance of the letter "e"
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 12:00:01 2026 UTC