Jump to content


Photo

PHP File Upload Problem


  • Please log in to reply
3 replies to this topic

#1 chronicx

chronicx
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 01 May 2006 - 09:56 PM

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?

#2 Caesar

Caesar
  • Members
  • PipPipPip
  • Advanced Member
  • 1,025 posts

Posted 01 May 2006 - 11:20 PM

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.
PHP Ninja

#3 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 02 May 2006 - 02:52 AM

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

#4 chronicx

chronicx
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 04 May 2006 - 04:41 PM

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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users