English 中文(简体)
否则,所有权就会改变
原标题:unzip a file then change ownership

在我的服务器上,我有若干文件。 然后,我用这一文字摘录:

$zip = new ZipArchive;
if ($zip->open($file_root."/install.zip") === TRUE) 
{
    $zip->extractTo($file_root."/");
    $zip->close();
}

问题是,这些档案的所有权属于“任何人”,我需要加以改变,以便我们能够通过FTP编辑档案。

我做了公正的研究,在任何地方都找不到答案。

问题回答

ZIP的档案并不支持“团结”式的所有权信息,阿帕奇无法创建拥有所有权的档案,而不是它作为任何途径运行的任何身份。 你不得不使用<代码>chown<>/code>,在别处增加特权,改变所有权,而不是任何人。 可以通过阿帕奇利用代谢来做到这一点,尽管你总是以这种方式提升阿帕奇的特权。 由于某种原因,它是一种减少特权的使用者。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签