I am trying to change the file permissions of the file "contador.txt" with the following program:
<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors',true);
chmod("contador.txt",0777);
?>
The file contador.txt is in the same directory of the script.
But I can't change the file permissions ant the following message appears:
Warning: chmod():Operation not permitted in /usr/www/htdocs/eduardo/cambia.php on line 5
What can I do? Please help
Problems with chmod()
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Problems with chmod()
A quick search found that that function could be disabled in your php.ini. The other possibility is that you don't have permission to chmod that file.
Re: Problems with chmod()
means that you are not the owner of the file you are trying to chmod.Warning: chmod():Operation not permitted in /usr/www/htdocs/eduardo/cambia.php on line 5
There are 10 types of people in this world, those who understand binary and those who don't