Jump to content

I can't seem to CMOD a file...


andyhajime

Recommended Posts

$PATH = '../cache/whoisuser.log';
chmod($PATH, 0777);
$FILE = fopen($PATH, 'w') or message_die(GENERAL_ERROR, $ERRNOTE.$BACKLINK);
$DATA = $reg_ip . "\n";
fwrite($FILE, $DATA);
fclose($FILE);

 

This is my line code. I'm trying to CMOD $PATH by I keep receiving this error.

Warning: chmod() [function.chmod]: Operation not permitted in /home/redcap/domains/dsdexigns.com/public_html/

 

Any idea why?

Link to comment
https://forums.phpfreaks.com/topic/97755-i-cant-seem-to-cmod-a-file/
Share on other sites

Is the cache folder inside your public_html folder? If it isn't then it wont work. You are only allowed access to files within the public_html folder

 

The cache folder is located inside the project file. The $PATH is correct as the code was execute at "root/Admin Folder/".

 

I dont think "It is forbidden to use by your hosting provider." as like lordfrikk says.

Correct me if I'm wrong but if if is forbidden, I can still CHMOD directory but not a file. Besides, the hosting provider is own by my closest friend. I doubt he disable this function cause we're both need this to work while doing out projects.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.