#1
  1. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Sep 2006
    Posts
    2,122
    Rep Power
    539

    Creating directory has funny permissions


    I execute the following script, and create the below directory. While do I get permission "drwxr-sr-x" and not "drwxrwxr-x"?

    PHP Code:
    $dir='/var/www/bidjunction/html/demo';
    if(!
    mkdir($dir0775)){throw new Exception('Directory already exists');} 
    Code:
    drwxr-sr-x.  4 apache  www  4096 Sep  9 09:44 demo
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,473
    Rep Power
    653
    Probably because the parent directory has the sticky bit on as well.

    Comments on this post

    • NotionCommotion agrees : You are right!
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Sep 2006
    Posts
    2,122
    Rep Power
    539
    You are absolutely correct. Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo