virtuexru Posted November 24, 2007 Share Posted November 24, 2007 Hey everyone, Need some help. Recently moved to a dedicated server from a shared one. I have a private video upload script but it isnt working any longer? Php globals are on. I end up getting this error: Warning: chmod() [function.chmod <http://*****.com/admin/function.chmod> ]: Operation not permitted in /home/v****/public_html/admin/upload_sub.php on line 49 I had hostgator move my files, and nothing in the scripts was changed. How do i fix this?? Edit: Changed subject to conform to forum rules. Link to comment https://forums.phpfreaks.com/topic/78703-new-server-upload-script-stops-working-chmod-not-permitted/ Share on other sites More sharing options...
toplay Posted November 24, 2007 Share Posted November 24, 2007 Check the directory permissions. The unix permissions set on the directory and/or file you're trying to manipulate with chmod() must allow the PHP script access to do it. Link to comment https://forums.phpfreaks.com/topic/78703-new-server-upload-script-stops-working-chmod-not-permitted/#findComment-398297 Share on other sites More sharing options...
virtuexru Posted November 24, 2007 Author Share Posted November 24, 2007 Well the file folders where the stuff goes is modded to 755, the php script itself CHMODS it to 777 to move the file. Link to comment https://forums.phpfreaks.com/topic/78703-new-server-upload-script-stops-working-chmod-not-permitted/#findComment-398320 Share on other sites More sharing options...
virtuexru Posted November 25, 2007 Author Share Posted November 25, 2007 Can anyone else have any input please? Link to comment https://forums.phpfreaks.com/topic/78703-new-server-upload-script-stops-working-chmod-not-permitted/#findComment-398504 Share on other sites More sharing options...
toplay Posted November 25, 2007 Share Posted November 25, 2007 The error is what it is. You're not allowed to do it....so check with your web host provider to see if they allow the command within PHP and secondly, the directory may not allow the PHP script to change it with it only set as 755. Link to comment https://forums.phpfreaks.com/topic/78703-new-server-upload-script-stops-working-chmod-not-permitted/#findComment-398893 Share on other sites More sharing options...
runnerjp Posted November 25, 2007 Share Posted November 25, 2007 set direc to 777 Link to comment https://forums.phpfreaks.com/topic/78703-new-server-upload-script-stops-working-chmod-not-permitted/#findComment-398915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.