PHP Upload Script with File Mode Changes! How do ya do it?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
soarchrist
Forum Newbie
Posts: 4
Joined: Wed Sep 20, 2006 11:25 pm

PHP Upload Script with File Mode Changes! How do ya do it?

Post by soarchrist »

I'm having a VERY frustrating time getting mode changes to work.

I've worked with two separate ftp_chmod type functions and neither of them work.


My upload script works great, but by default the permissions set on the uploaded files are so restrictive practically no one can see them. Is there any way I can change the 'default' file permission... or change the file permission during upload? Or... what? I'm lost. I just want to make these files available to the public after upload!

Thanks!

S.
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

Have you tried chmod ?
soarchrist
Forum Newbie
Posts: 4
Joined: Wed Sep 20, 2006 11:25 pm

Tried Chmod

Post by soarchrist »

you know... I'm ticked.

For hours I was getting an error message from "chmod" and found someone else who related the error to shared web hosting. I forget the type of error... so I plugged in a quicky chmod script and guess what? it worked. I've spent the passed 3 hours researching a round-about way to do this when I must have changed some setting (I did mess with some PHP settings...).

Oh well.. in the end it looks like it works. Thanks for your reminder-- b/c chmod was my first choice...

Goodnight!

S.
Post Reply