Forum Moderators: coopster

Message Too Old, No Replies

root level mkdir

         

trimast

2:35 pm on Jun 18, 2005 (gmt 0)

10+ Year Member



Hi,

Ok, i know there are loads of threads covering this topic i've read most of them and they've given me food for thought, but still can't get my head around the best way to do this:

Basically i'm just finishing off a new membership orientated site and what we need is when a new member joins, on confirmation of payment i need the system to create a directory / folder then copy in aload of the files, and create two sub folder within their own folder.

Now i can create them fine at the following level:

mydomain.co.uk/my_folder/my mkdir folder/

but still they just won't work at

mydomain.co.uk/my mkdir folder

I know my root isn't set to 777 which explains part of the problem, but i don't really want to chmod it to a 777 for security reasons, so has anybody got any ideas on the best course of action?

I thought about writing an ftp protocol to create the dir using php, but not to sure if i'll get the same probs.

Any help would be really appreciated.

Thanks,

Rob

mcibor

9:20 pm on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Who's the owner of that root folder?
It should be apache, and only apache does need to have an ability to execute, write and read that root directory (if you use linux, then it's /var/www/html). The group and all don't need to have any permission.

Hope this helps
Michal Cibor

trimast

1:40 pm on Jun 19, 2005 (gmt 0)

10+ Year Member



thanks,

would the fact i'm currently using a shared server make any difference? The site will be moved to a dedicated server when it goes live, but we are trying to get everything set up and sorted on a shared server first.

in answer to your q - apache i think, not really paid much attention to it before /home/myid/public_html/ thats what i've got

Rob

mcibor

3:31 pm on Jun 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Then I think, that you are the owner of that folder. If possible change the group to apache and give the permission to execute. If that's not possible, then you will have to use chmod 777 (at least for that folder).

If you can't change the group, then ask administrator to do that.

Best regards
Michal

trimast

1:34 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



hi,

thanks for the feedback. won't the site be open to security risks if i chmod my public_html dir to 777?

or have i been mistaken about that?

Rob