gileze Posted March 30, 2006 Share Posted March 30, 2006 Hi There.I am creating a script for automatic folder creation with full access priveliges.I know the decimal value for CHMOD is 777 but that doesnt work in PHP.Does anyone know the Octal value for 777?Thanks. Link to comment https://forums.phpfreaks.com/topic/6170-chmod-in-php/ Share on other sites More sharing options...
trq Posted March 30, 2006 Share Posted March 30, 2006 0777 Link to comment https://forums.phpfreaks.com/topic/6170-chmod-in-php/#findComment-22267 Share on other sites More sharing options...
redbullmarky Posted March 30, 2006 Share Posted March 30, 2006 this might help too:[a href=\"http://uk2.php.net/chmod\" target=\"_blank\"]http://uk2.php.net/chmod[/a] Link to comment https://forums.phpfreaks.com/topic/6170-chmod-in-php/#findComment-22279 Share on other sites More sharing options...
craygo Posted March 30, 2006 Share Posted March 30, 2006 Here is a breakdown of chmod. Even though php usesthe 4 digit code, ie 0755 only the last tree really mean anything.I will use and example of 0764 as a chmod0 = Sort of a buffer for php leave it at 07 = Owners Rights //Owners position6 = Group Rights //Group position4 = Everyone elses writes //Everyone positionThe digit can be any of the defined value (explained in a second) the position is important. Now the numbers are derived like so1 = Execute2 = Write4 = ReadSo what you do is add up the permissions you want to give and use that number in the position you want.Example above 764 meanOwner has full access Read, Write, Execute 4+2+1=7Group has Read, Write 4+2=6Everyone has Read 4Hope that helpsRay Link to comment https://forums.phpfreaks.com/topic/6170-chmod-in-php/#findComment-22288 Share on other sites More sharing options...
gileze Posted March 30, 2006 Author Share Posted March 30, 2006 Ok thanks, all works now. Link to comment https://forums.phpfreaks.com/topic/6170-chmod-in-php/#findComment-22293 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.