Page 1 of 1

CHMOD Question.

Posted: Sat Mar 19, 2005 8:51 am
by Dale
What number would i use on a folder, to allow uploads, downloads, but so you cannot delete the files that are uploaded. Possibly not renamed them either (and possibly cannot be re-CHMOD'd).

Posted: Sat Mar 19, 2005 9:06 am
by feyd
just use an upload/download script. The only options for permissions are read, write, execute for each type on the file system.

You will need to, at least, make the folder read and write to php's user, and you'll probably want read and write access for your user as well (for FTP and junk). So a setting of 0755 is often good enough. Now, if you want to allow direct downloading from the folder, you will need 0757 or similar.

Posted: Sat Mar 19, 2005 9:08 am
by Dale
This has nothing to do with PHP, its a question about a "public" ftp that i'm doing.

Posted: Sat Mar 19, 2005 9:13 am
by feyd
then have two directories. One that's read and execute, the other write permissions..

I believe that's how the old ftp places used to work. They would review the uploads before they became available for download.

To me, it's far easier to handle through PHP on a site.

Posted: Sat Mar 19, 2005 9:23 am
by Dale
feyd wrote:then have two directories. One that's read and execute, the other write permissions..

I believe that's how the old ftp places used to work. They would review the uploads before they became available for download.

To me, it's far easier to handle through PHP on a site.
I know its easier to handle via PHP, however i dont think uploading 15MB files would work well with a 56k modem and uploading via a form.

Posted: Sat Mar 19, 2005 9:30 am
by feyd
it works pretty similarly. You just need to set php to accept long and large uploads, which you can find out how to do by reading the "upload file handling" documentation on php.net