You are here: chmod() « All PHP « IT news, forums, messages
chmod()

Posted by MS on 05/28/05 20:05

I am trying to chmod a file. my test code is...

if(file_exists($nwfn)) {
echo "Found ($nwfn)<br>\n";
if (chmod($nwfn, 0777)){
echo "chmod changed to 0777<br>\n";
}
}
--------------------------------------
$nwfn is the filesystem location of the file..

output of this code is...

Found (/home/mysite/public_html/test/admin/includes/configure.php)

Warning: chmod(): Operation not permitted in
/home/mysite/public_html/test/admin/php-bin/create_test.php on line 13

my question is.. for what reason is the chmod operation not permitted?

also when you have a file in a subdirectory and the chmod of the file is 777
does it matter what the chmod of the directories are to be able to edit the
file?

Thnx
Alex
--
----------------------------------------------------------------------------
http://www.clickonlingerie.com?SIG - Exotic Erotic Lingerie
----------------------------------------------------------------------------

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация