andyhajime Posted March 25, 2008 Share Posted March 25, 2008 $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 More sharing options...
lordfrikk Posted March 25, 2008 Share Posted March 25, 2008 It is forbidden to use by your hosting provider. Link to comment https://forums.phpfreaks.com/topic/97755-i-cant-seem-to-cmod-a-file/#findComment-500181 Share on other sites More sharing options...
wildteen88 Posted March 25, 2008 Share Posted March 25, 2008 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 Link to comment https://forums.phpfreaks.com/topic/97755-i-cant-seem-to-cmod-a-file/#findComment-500221 Share on other sites More sharing options...
andyhajime Posted March 31, 2008 Author Share Posted March 31, 2008 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. Link to comment https://forums.phpfreaks.com/topic/97755-i-cant-seem-to-cmod-a-file/#findComment-505756 Share on other sites More sharing options...
BlueSkyIS Posted March 31, 2008 Share Posted March 31, 2008 "Correct me if I'm wrong but if if is forbidden, I can still CHMOD directory but not a file" you are wrong. if it is forbidden, you can't chmod anything. Link to comment https://forums.phpfreaks.com/topic/97755-i-cant-seem-to-cmod-a-file/#findComment-505757 Share on other sites More sharing options...
andyhajime Posted March 31, 2008 Author Share Posted March 31, 2008 "Correct me if I'm wrong but if if is forbidden, I can still CHMOD directory but not a file" you are wrong. if it is forbidden, you can't chmod anything. Then why can I CHMOD a directory to 777 and it works?? Link to comment https://forums.phpfreaks.com/topic/97755-i-cant-seem-to-cmod-a-file/#findComment-505760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.