Hi NG
If I write the following:
<?php
$file="myfile.J PG";
if ( getmyuid()==fil eowner ( $file ) )
{
chgrp ( $file, getmygid() );
chown ( $file, getmyuid() );
chmod ( $file, 0600 );
}
?>
And the result is this:
Warning: chgrp(): Operation not permitted in /.../test/index.php on line
5
Warning: chown(): Operation not permitted in /.../test/index.php on line
6
Warning: chmod(): Operation not permitted in /.../test/index.php on line
7
Does that mean the functions (chgrp, chown, chmod) has been disabled on my
php-deamon? I assume; if I own the file I should be able to change the
rights of the file? It is possible to do this by ftp, but I'd rather do it
by the php-script.
Thanks....
--
Med Venlig Hilsen
Ask Josephsen
If I write the following:
<?php
$file="myfile.J PG";
if ( getmyuid()==fil eowner ( $file ) )
{
chgrp ( $file, getmygid() );
chown ( $file, getmyuid() );
chmod ( $file, 0600 );
}
?>
And the result is this:
Warning: chgrp(): Operation not permitted in /.../test/index.php on line
5
Warning: chown(): Operation not permitted in /.../test/index.php on line
6
Warning: chmod(): Operation not permitted in /.../test/index.php on line
7
Does that mean the functions (chgrp, chown, chmod) has been disabled on my
php-deamon? I assume; if I own the file I should be able to change the
rights of the file? It is possible to do this by ftp, but I'd rather do it
by the php-script.
Thanks....
--
Med Venlig Hilsen
Ask Josephsen
Comment