Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.