Jump to content

PHP File Upload Problem


chronicx

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?
Link to comment
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.
Link to comment
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
Link to comment
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.