Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating folders and chmoding them

Status
Not open for further replies.

JohnnyT

Programmer
Jul 18, 2001
167
GB
I want to be able to create a folder in a directory and chmod it to 777, how can I go about this?

I'm starting a Members Only section on a website I run, and I want to automatically create a folder with the same name as the newly registered member. This folder also needs to be chmod 777 so that the members can upload images to it.

Another quick question is this... is there any terrible security issues with allowing them to do this. The script I am using ensures the files uploaded only have image extensions but I'm still a bit wary of opening a 'gateway', as it were, to the server.

Any help you can give me on any of these points will be very much appreciated.

Thanks

JT I don't make mistakes, I'm merely beta-testing life.
 
XX7 permission is, as a general rule, a bad idea.

I am assuming that you are running Apache on a *nix box, and that you are handling the file uploads through PHP. If that is the case, then Apache's user needs to have write permissions. With that you can set world permissions to read only. ______________________________________________________________________
TANSTAAFL!
 
sleipnir214

Thanks for your reply. Understood.

How would I go about creating the folder and changing the permissions in PHP.?

Any ideas?

Thanks for your help

JT I don't make mistakes, I'm merely beta-testing life.
 
Daniel

Thanks for your help mate. So its the same as Perl near enough.

Thanks for pointing me in the right direction.

Cheers

JT I don't make mistakes, I'm merely beta-testing life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top