POSIX_SETUID(3) 1 POSIX_SETUID(3)posix_setuid - Set the UID of the current processSYNOPSIS
bool posix_setuid (int $uid)
DESCRIPTION
Set the real user ID of the current process. This is a privileged function that needs appropriate privileges (usually root) on the system
to be able to perform this function.
PARAMETERS
o $uid
- The user id.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
posix_setuid(3) example
This example will show the current user id and then set it to a different value.
<?php
echo posix_getuid()."
"; //10001
echo posix_geteuid()."
"; //10001
posix_setuid(10000);
echo posix_getuid()."
"; //10000
echo posix_geteuid()."
"; //10000
?>
SEE ALSO posix_setgid(3), posix_seteuid(3), posix_getuid(3), posix_geteuid(3).
PHP Documentation Group POSIX_SETUID(3)
Check Out this Related Man Page
POSIX_GETEUID(3) 1 POSIX_GETEUID(3)posix_geteuid - Return the effective user ID of the current processSYNOPSIS
int posix_geteuid (void )
DESCRIPTION
Return the numeric effective user ID of the current process. See also posix_getpwuid(3) for information on how to convert this into a use-
able username.
RETURN VALUES
Returns the user id, as an integer
EXAMPLES
Example #1
posix_geteuid(3) example
This example will show the current user id then set the effective user id to a separate id using posix_seteuid(3), then show the
difference between the real id and the effective id.
<?php
echo posix_getuid()."
"; //10001
echo posix_geteuid()."
"; //10001
posix_seteuid(10000);
echo posix_getuid()."
"; //10001
echo posix_geteuid()."
"; //10000
?>
SEE ALSO posix_getpwuid(3), posix_getuid(3), posix_setuid(3), POSIX man page GETEUID(2).
PHP Documentation Group POSIX_GETEUID(3)
Hi,
I have a file name, for which I want to strip out the first bit and leave the rest...
So I want to take the file name .lockfile-filename.10001 ,strip it and have only filename.10001 ...
Thanking you all inadvance,
Zak (6 Replies)
This drive me nut, any can show me how to do it ??
str1='Case Modify 10001 20002 30003 40004|Report Create 3417176211|Case Modify 10002 20002 30003 40004'
and str2='Case Modify 10001'
if str1 ~ str2
then str1='Report Create 3417176211|Case Modify 10002 20002 30003 40004'
Thanks, (8 Replies)
hello all,
i am having a variable with a value of 0000010000 and if i add the variable with some no:
suppose
i=0000010000
n=`expr $i + 1`
echo $n
the output i am reciving is 10001 .it deletes all the zeros
but i need result as 0000010001..
please help me...
thanks in... (3 Replies)
How do i go about getting the uid of the user and verify ?
if
then
echo "You are not a superuser, please login as a superuser"
exit1;
fi
the above code doesn't work. can some guru please help me.
1. how to get the uid of the user ? i know by typing id but how to... (7 Replies)
Hi,
I've a data file with similar keys coming in. I want to assign an incremental counter to those records and attach to a file
for example
File
10001 ABCD
10002 PQRS
10001 ABCD
10003 QWER
10001 ABCD
10002 PQRS
10004 POIU
output as
10001 ABCD 1
10002 PQRS 1
10001 ABCD 2
10003... (3 Replies)
I need help with extracting data from a large file ~900mb. Below is how the data looks like,
line number value
1001 10000
... ...
5001 50000
6001 60000
... ...
10001 100000
... ...
100001 ... (3 Replies)
Hi All,
I have a file like this,(This is a sql output file)
cat query_file
200000029
12345 10001
0.2 0
I want to fetch the values 200000029,10001,0.2 .I tried using the below code but i could get... (2 Replies)
I basically have a file where I had to do a bunch of greps to get a list of numbers
example: a file called numbers.txt
10000
10000
superman
10000
batman
10000
10000
grep '100' * |
10000
10000
10000
10000
10000 (2 Replies)