ivey Posted August 25, 2007 Share Posted August 25, 2007 i just checked and the root directory for my whole local host is set at permission 0644. how do i change this? i don't think i have permission to change my permissions, because when i try to put the following code: chmod ("phppractice/processor.php", 0777); i get this error message: Warning: chmod() [function.chmod]: Operation not permitted in /Users/ivey/Sites/permissions.php on line 8 thank you for your help! Quote Link to comment https://forums.phpfreaks.com/topic/66683-solved-permissions/ Share on other sites More sharing options...
dani9990 Posted August 25, 2007 Share Posted August 25, 2007 go to below link you will find your answer http://us.php.net/chmod dani Quote Link to comment https://forums.phpfreaks.com/topic/66683-solved-permissions/#findComment-334086 Share on other sites More sharing options...
ivey Posted August 25, 2007 Author Share Posted August 25, 2007 Thank you. I tried this though. here's my code: <?php echo substr(sprintf("%o",fileperms("permissions.php")),-4); chmod("phppractice/processor.php", 755); // decimal; probably incorrect chmod("phppractice/processor.php", "u+rwx,go+rx"); // string; incorrect chmod("phppractice/processor.php", 0755); // octal; correct value of mode ?> and here's the error i got: Warning: chmod() [function.chmod]: Operation not permitted in /Users/ivey/Sites/permissions.php on line 8 Warning: chmod() [function.chmod]: Operation not permitted in /Users/ivey/Sites/permissions.php on line 8 Warning: chmod() [function.chmod]: Operation not permitted in /Users/ivey/Sites/permissions.php on line 8 any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/66683-solved-permissions/#findComment-334088 Share on other sites More sharing options...
ivey Posted August 25, 2007 Author Share Posted August 25, 2007 Please help. i'm so confused... am i putting the chmod code in the wrong file? where do i put it? inside the page i'm trying to execute? thanks! Quote Link to comment https://forums.phpfreaks.com/topic/66683-solved-permissions/#findComment-334100 Share on other sites More sharing options...
ivey Posted August 25, 2007 Author Share Posted August 25, 2007 AH! finally figured it out, so i thought i'd post it in case anyone else is having this problem - might be a little basic for this forum though... YOU can go into MAC's terminal! applications > utilities > terminal and then enter the following: chmod 755 filepath/filename.php you need to do this for all writeable files and you must make the file that you write TO 757: chmod 757 filepath/filename.txt Quote Link to comment https://forums.phpfreaks.com/topic/66683-solved-permissions/#findComment-334157 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.