scotttyz Posted March 21, 2004 Posted March 21, 2004 I am working on my first home-grown MySQL database. Would like some advice on how to handle files uploaded and permissions. We will have CAD files (and jpg images) that would be "uploaded" to a directory via an "add DB record" php page. The files need to be viewable to PHP/FTP/HTTP users. i.e I add a record with all the info and "Browse..." to the CAD and jpg files. the php webpage adds the DB entry and uploads the files to my specified directory. The files would have 3 ways for a user to get them, via FTP, via MySQL search (given a link) and via HTTP (I am using e-dir). Am I correct that files uploaded by PHP are assigned the owner of apache and are unreadable to other users? If this is correct is there an easy way around this? I would like to have 1 page to add the complete information, and not have a user have the need to ftp the files and enter the SAME info for the DB record, you all know how carefull most users are, lmoa. Rock Sign Quote
TCH-Don Posted March 22, 2004 Posted March 22, 2004 I believe they are owned by the php program. And can be read by all, but only updated or deleted by the php program. Hopefully a php guru can elaborate. Quote
scotttyz Posted March 23, 2004 Author Posted March 23, 2004 I have read in other places that PHP will use the user of apache in some (if not many) cases and the file can only be read by PHP Quote
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.