超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<chmodclearstatcache>
Last updated: Fri, 22 Jun 2007

chown

(PHP 3, PHP 4 , PHP 5)

chown -- 改变文件的所有者

说明

bool chown ( string filename, mixed user)

尝试将文件 filename 的所有者改成用户 user(由用户名或用户 ID 指定)。只有超级用户可以改变文件的所有者。

如果成功则返回 TRUE,失败则返回 FALSE

注: 本函数不能作用于远程文件,被检查的文件必须通过服务器的文件系统访问。

参见 chmod()




add a note add a note User Contributed Notes
chown
njs+php at scifi dot squawk dot com
22-Sep-2000 02:28
If you allow sudo execution for chmod by "nobody" (www, webdaemon, httpd, whatever user php is running under)in this manner, it had better be a system on which the owner is able to be root and no one else can run code, else your whole system is compromised.  Someone could change the mode of /etc/passwd or the shadow password file.

Other system commands (sudo mount) and so forth are similar.

<chmodclearstatcache>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22