iOS Question postmultipart and chmod

Discussion in 'iOS Questions' started by tufanv, May 28, 2018.

  1. tufanv

    tufanv Expert Licensed User

    Hello ,

    I use the below code to upload files:

    Dim MFD As MultipartFileData
        MFD.Dir = 
        MFD.FileName = sen
        MFD.KeyName = 
    and php side is:

    $uploaddir = '/home/www/uploads';
    $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo "File is valid, and was successfully uploaded.\n";
    } else {
        echo "Possible file upload attack!\n";
    if I dont set the upload dir chmod to 777 file is not being uploaded. Even 755 chmod is not enough. Chmod 777 may be a security risk for me so , what should I do with this ? Is there a reason I cant upload without chmod 777 ?

  2. Erel

    Erel Administrator Staff Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice