Jump to content

Recommended Posts

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 chmod

0 = Sort of a buffer for php leave it at 0
7 = Owners Rights //Owners position
6 = Group Rights //Group position
4 = Everyone elses writes //Everyone position

The digit can be any of the defined value (explained in a second) the position is important.

Now the numbers are derived like so

1 = Execute
2 = Write
4 = Read

So what you do is add up the permissions you want to give and use that number in the position you want.

Example above 764 mean

Owner has full access Read, Write, Execute 4+2+1=7
Group has Read, Write 4+2=6
Everyone has Read 4

Hope that helps

Ray
Link to comment
https://forums.phpfreaks.com/topic/6170-chmod-in-php/#findComment-22288
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.