★ wanayoo — archive 1999 http://www.php.net/manual/function.getmyuid.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to PHP options/info
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
PHP options/info
* error_log
* error_reporting
* extension_loaded
* getenv
* get_cfg_var
* get_current_user
* get_magic_quotes_gpc
* get_magic_quotes_runtime
* getlastmod
* getmyinode
* getmypid
* getmyuid
* getrusage
* phpinfo
* phpversion
* php_logo_guid
* php_sapi_name
* putenv
* set_magic_quotes_runtime
* set_time_limit
* zend_logo_guid
* get_loaded_extensions
* get_extension_funcs
* get_required_files
* get_included_files
Manual: getmyuid
View the source code for this pageSearch the site



Previous page
 getmypid
 Updated
Sat, 12 Aug 2000
getrusage 
Next page


getmyuid

(PHP3 , PHP4 )

getmyuid -- Get PHP script owner's UID.

Description

int getmyuid (void)

Returns the user ID of the current script, or false on error.

See also getmypid(), get_current_user(), getmyinode(), and getlastmod().


User Contributed Notes: getmyuid


goingcrazy42@hotmail.com
04-Jan-2000 09:41
On Apache servers who have the PHP module compiled in to the Apache webserver it typicaly inherits the uid of the nobody user. However after creating a directory with PHP (nobody) you can not create new files in the directory because your uid is probably different from that of the nobody user. I've personally experienced that problem when my server was still running as a virtual server at my ISP. This means I could not create my own directories and then create new files in them. Which was a major shock to me at that time, because I was writing a program which relies on being able to create it's own directories and files. So if anyone knows how to solve that problem, I would glady like to hear so. It was impossible to use the chown and chgrp commands as the nobody user is not the superuser as a result I could not set the owner to point to myself.


sRp@srparish.net
04-Apr-2000 02:48
After running into this problem, i wrote a program which you can install as setuid root in you php safemode exec dir. (defined in php3.ini) You then can do system() calls to this program to change the ownership of file, in a fassion such so that it shouldn't allow people to break the security of your box. You can get the program at http://srparish.net/scripts/chuid-1.0.tar.gz


 About Notes


Previous page
 getmypid
 Updated
Sat, 12 Aug 2000
getrusage 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.