Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: PHP Permissions

  1. #1
    Saj
    Saj is offline
    Regular Coder
    Join Date
    Feb 2003
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Permissions

    Hi.

    I am trying to install a phpBB board, and I really don't know the permissions for "writable by all." I need that for the config.php.

    Thanks
    - Saj

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Basic permissions work as follows:

    Values:
    read = 4
    write = 2
    execute = 1

    Groups:
    Owner, group, others

    Now, permissions a a set of 3 numbers, where the first represents the owner of a file, the 2nd is the group assigned to the file and the 3rd is everyone else.

    Each group gets a single number which corresponds to that group's permission. IE:

    421 means the Owner can read the file, group members can write to the file and everyone else can execute the file.

    If you want to combine permissions (ie let people reand a write to a file) you simply add the values for the permission level

    IE
    7 = read (4) + write(2) + execute(1)
    6 = read (4) + write(2)
    5 = read (4) + execute(1)
    4 = read
    3 = write(2) + execute(1)
    2 = write
    1 = execute
    0 = none

    so 755 means :
    owner can read, write, and execute
    group can read and execute
    others can read and execute

    Now if you want to make the file "writable by everyone" you need to use any combination of 7, 6, 3, or 2 for the file permissions. (I would recommend 666, or 777).

    Hope this helps.

  • #3
    Saj
    Saj is offline
    Regular Coder
    Join Date
    Feb 2003
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes thank you that helps. I'll do 666 because the users do not need to execute a php file (correct me if I'm wrong).
    - Saj


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •