chronicx Posted May 1, 2006 Share Posted May 1, 2006 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? Quote Link to comment Share on other sites More sharing options...
Caesar Posted May 1, 2006 Share Posted May 1, 2006 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. Quote Link to comment Share on other sites More sharing options...
craygo Posted May 2, 2006 Share Posted May 2, 2006 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 Quote Link to comment Share on other sites More sharing options...
chronicx Posted May 4, 2006 Author Share Posted May 4, 2006 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.