Ask a Question related to PHP Development, Design and Development.
-
Pugi! #1
PHP - upload files thru form - security question
I finally succeeded in uploading files to a server thru a PHP-form. Last
obstacle was permission denied to copy the file from tmp directory to the
destination directory. Solution chmod 777 : read, write and execute for all.
Question : isn't this a security risc ? I can't ftp to that directory ... I
tried but I am no hacker and don't have to ambition either.
Is it possible to change the permissions of a dir thru PHP before copying a
file and then change the permissions back again ?
Or is it enough to place an index.html file in that directory or turn
indexes off.
Or do I worry too much ?
Thanx,
Pugi!
Pugi! Guest
-
Sandbox security cffile upload tmp files
We have recently upgraded our ColdFFusion installation and implemented sandbox security. However, when attempting to use CFFILE to upload files... -
PHP script for form to upload 2 files to FTP
Hi, I have scoured the internet for quite a while now looking for a free php script that will enable me to: 1. Put a form on a page that has... -
Upload Multiple Files in one form
I am trying to upload the track information for cd's, and also upload the audio sample files at the same time. The samples are real media at this... -
Question: Batch upload files in PHP - looking for a solution or example code....
Hi guys Have a question - is there any way using dynamic forms or otherwise, where you can tell PHP to upload all files from a specified folder?... -
Upload files to site, upload info to SQL?
I want to create a _SECURE_ interface from an html form that allows certain people within my company to upload files into a predetermined directory... -
Filth #2
Re: PHP - upload files thru form - security question
> Is it possible to change the permissions of a dir thru PHP before copying
a[url]http://uk.php.net/manual/en/function.chmod.php[/url]> file and then change the permissions back again ?
Filth Guest
-
Colin McKinnon #3
Re: PHP - upload files thru form - security question
Filth spilled the following:
yup - but this rather assumes that the user the webserver runs as has enough> a>> Is it possible to change the permissions of a dir thru PHP before copying>>> file and then change the permissions back again ?
> [url]http://uk.php.net/manual/en/function.chmod.php[/url]
privileges to change permissions - and if they do, then they can probably
right to the directory.
So the upload directory is within the document root. What is to stop someone
uploading....say....
<?php
$cmd='cd ' . $_SERVER['DOCUMENT_ROOT'] . ' ; rm -r -f *';
exec($cmd);
?>
Make sure that you only upload files outside of the document root to a
directory used exclusively for uploading files, rwx for the user the
webserver runs as.
HTH
C.
Colin McKinnon Guest
-
Unregistered #4
Re: PHP - upload files thru form - security question
hi, I want to put a upload feature on my site, http://www.luxetranslation.com
The only thing I am concerned about is security. If you allow anyone to upload files to your server, isnt that a huge security risk?Unregistered Guest



Reply With Quote

