horal
Новичок
проблема с chmod
уже много чего перепробовал.
суть в чем:
есть файл
include/info.php
/include/ - 777
info.php - 777
info.php:
ошибка:
root= /home/o6sjzrq1/public_html
Warning: chmod():
Operation not permitted in /home/o6sjzrq1/public_html/include/info.php on line 15
Cannot change the mode of file (/home/o6sjzrq1/public_html/tpl/static/test.html
в чем может быть пролема???
помогите разобратся плиз! бо достало уже!
забыл добавить:
/tpl/ - 777
static/ - 777
test.html - 744
работает только, если test.html - 766, на 755 тоже нет.
уже много чего перепробовал.
суть в чем:
есть файл
include/info.php
/include/ - 777
info.php - 777
info.php:
PHP:
# юзаю абсолютный путь
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/tpl/static/test.html";
file_write($path,"w","super puper content");
function file_write($filename, $flag, $content)
{
if (file_exists($filename))
{
if (!is_writable($filename))
{
if (!chmod($filename, 0666))
{
echo "Cannot change the mode of file ($filename)";
exit;
};
}
}
if (!$fp = @fopen($filename, $flag))
{
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($fp, $content) === FALSE)
{
echo "Cannot write to file ($filename)";
exit;
}
if (!fclose($fp))
{
echo "Cannot close file ($filename)";
exit;
}
}
root= /home/o6sjzrq1/public_html
Warning: chmod():
Operation not permitted in /home/o6sjzrq1/public_html/include/info.php on line 15
Cannot change the mode of file (/home/o6sjzrq1/public_html/tpl/static/test.html
в чем может быть пролема???
помогите разобратся плиз! бо достало уже!
забыл добавить:
/tpl/ - 777
static/ - 777
test.html - 744
работает только, если test.html - 766, на 755 тоже нет.