Jump to content

[SOLVED] permissions


ivey

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

Archived

This topic is now archived and is closed to further replies.

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