I have been trying to create a new directory under unix with a PHP script which uses the mkdir function but have been unable to do what I need. Only by changing the permissions (chmod) of the target directory to 777 can I create the directory. However, changing the directory permissions to 777 is something that I want to avoid.
What I would like to do is this:
1. Create a new directory in my home (root) directory which currently has its permissions set to 755. Since my site is with an IP and it is they who have chosen the 755 permissions I would like to leave these home directory permissions as they are; i.e. 755. After creation of the new directory I will be able to access it at: /home/newDir .
2. The PHP script which executes the mkdir function should reside in path: /home/phpScripts
I would naturally appreciate any help anyone could give.
Thanks,
George