Jump to content

Archived

This topic is now archived and is closed to further replies.

chronicx

PHP File Upload Problem

Recommended Posts

I have a script to upload a file into a directory on my server. The files upload great, but the problem is that there are no permissions set for group or other, just owner. Is there a way to change permissions through php? Or do I have to find some other way to upload files?

Share this post


Link to post
Share on other sites
Why make life dificult for yourself? Open up your FTP client and change the permissions of the particular folder & make it writeable. (Unless you are being hosted on a Windows box. Ewwww...perish the thought) You can also do it via shell access.

Share this post


Link to post
Share on other sites
Love the anti windows people :)

i got 2 windows boxes and they have not gone down once, but this is not a windows-linux bashing contest!!

And to answer your question, PHP cannot set permissions on a directory unless you have given full access to the user for guest internet account, which would not be a good idea.

Ray

Share this post


Link to post
Share on other sites
im making life hard on myself because its not so i can upload files myself, its so others can upload images- avatars for a message board. and the folder has the permissions right, its the individual files that have no permissions for anyone but owner. and it would be impractical to change those permissions by hand every single time someone wants a new avatar. how do other boards or programs do it?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.