PHP create directory permission problem

Posted on 2006-03-24
Last Modified: 2010-04-07
Hi people,

I want to be able to get PHP to create a directory (and the add a writable file to it).

No problem you say, mkdir() is the answer.

However, I want PHP to be able to create a directory in a directory created by someone else.

total 0
drwxr-xr-x 3 mortal admin 102 Mar 23 21:41 .
drwxrwxrwx 61 al admin 2074 Mar 23 21:49 ..
drwxr-xr-x 2 mortal admin 68 Mar 23 21:41 test

The 'test' directory was successfully created by user 'mortal'. I want PHP to create a subdirectory called 'meta' but it doesn't have the permission to do so?!?!

Can anyone tell me how to either gain permission or otherwise get around this problem please?

Question by:blurgh

    Author Comment


    I am writing this application for Apache (on Mac)
    LVL 17

    Accepted Solution

    There should be a some group in parent directory, And the user which you ar trying to make directory should on one of that group.

    BR Dushan

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and Log…
    The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now