我如何更改由php编写的文件的所有者 [英] How I can change owner of files written by php
本文介绍了我如何更改由php编写的文件的所有者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从终端(命令行)更改php编写的文件的所有者?这些文件是通过上传表单创建的,位于相应的文件夹中.
How can I change the owner of the files written by php from terminal (command line)? The files are created by upload form in apposite folder.
很多thaks
推荐答案
使用命令"chown":
Use the command "chown":
chown owner filenames
要在以后的上传中解决此问题,可以使用chown命令:
To solve this problem in the future uploads, you can use the chown command:
chown($path, $user_name);
http://php.net/manual/en/function.chown.php
如果您想更改权限,还有一个chmod命令:
There is also a chmod command, if you prefer to change permissions:
http://www.php.net/manual/zh/function .chmod.php
这篇关于我如何更改由php编写的文件的所有者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文