Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/66683-solved-permissions/
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/66683-solved-permissions/#findComment-334088
Share on other sites

:) 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

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/66683-solved-permissions/#findComment-334157
Share on other sites

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.