Menu

Upload form problems...

Help
2007-04-11
2013-06-03
  • MASTEREDonline.com

    Hi there. I recently submitted this request to my Hosting provider and got the responce below... (please read):

    TicketN° 2827 : Strange Error Codes
    Date submitted 2007-04-06 09:45:09
    Status Closed
    Priority Medium
    Staff Victor
    Category PHP,CGI,MySQL Problems 
    Subject Strange Error Codes

    • I've just created an Upload form using Fantastico (held at masteredonline/php/use/upload) which is working fine. However, when I come to delete the files uploaded, I get this error message: 550 Could not delete 08_39_13_IMAGE_124.jpg: Permission denied

    I reset all the permissions to read and write for all files and subfolders, but while doing so, I get THIS error message: 550 Could not change perms on [file name appears here]: Operation not permitted

    I've reset my FTP program and restarted the connection several times. While the form itself works ok, and I can reach the files and download them, when I've finished with them, I need to delete them so as not to use too much space.

    Please advise - not sure if this is a server error, a coding error, or just me being stupid.

    F, MRA
    ___________________
    Steps Taken
    Submitted by: Victor
    Date: 2007-04-11 04:11:17
    Message:

    • You will not be able to remove that files via FTP since they were uploaded under webserver username which is different from your account user ID.
    You will need to modify your upload script to make it upload files with '666' permissions, or install another script to remove uploaded files.

    Thanks,
    Victor

    ***************************

    Ok... so how to I do this? Anyone able to help?
    The form is located at www.masteredonline.com/upload.html and process.php is located at www.masteredonline.com/php/user/upload. All files uploaded seem to end up in php/user/upload/files. I can download, but not delete. I have to delete the ENTIRE form from the control panel and redo it each time if I want to clear the files. While I can recreate the same form in the same location, it's a pain in the ass. Any help would be great - info@masteredonline.com if anyone can help!

     
    • MASTEREDonline.com

      oops... should be www.masteredonline.com/php/use/upload

       
      • TNTEverett

        TNTEverett - 2007-04-11

        Try adding the following to your process.php file.

        Locate the line that looks like this:
        copy($HTTP_POST_FILES['FileName']['tmp_name'], "files/".$image_part);

        Add the following right after this line.
        chown("files/".$image_part, "yourusername");
        chmod("files/".$image_part, 0664)

        This page will explain details of the two functions used above. 
        http://www.onlamp.com/pub/a/php/2003/02/20/php_foundations.html

         
    • MASTEREDonline.com

      thanks for that. the only problem is when I try to upload the new process.php, it can't do it because I can't even set the permissions within the server to 777, or even 766 on anything in the "use" folder.  I get this message when trying upload the new process.php

      [17:46:20] Remote file exist check: "process.php".
      [17:46:20] TYPE I
      [17:46:21] 200 TYPE is now 8-bit binary
      [17:46:21] SIZE process.php
      [17:46:21] 213 3432
      [17:46:21] MDTM process.php
      [17:46:22] 213 20070406132516
      [17:46:22] No rule matched. Default Action="Ask".
      [17:46:23] PASV
      [17:46:23] 227 Entering Passive Mode (70,84,192,18,231,103)
      [17:46:23] Opening data connection to 70.84.192.18 Port: 59239
      [17:46:23] STOR process.php
      [17:46:23] 553 Rename/move failure: Permission denied
      [17:46:23] MDTM 20070412164301 process.php
      [17:46:24] 550 Can't check for file existence
      [17:46:24] TYPE A
      [17:46:24] 200 TYPE is now ASCII
      [17:46:24] PASV
      [17:46:24] 227 Entering Passive Mode (70,84,192,18,108,221)
      [17:46:24] Opening data connection to 70.84.192.18 Port: 27869
      [17:46:24] MLSD
      [17:46:24] 1436 bytes transferred. (11.2 KB/s) (125 ms)
      [17:46:24] 150 Accepted data connection
      [17:46:24] 226-Options: -a -l
      [17:46:24] 226 13 matches total
      [17:46:24] Transfer failed.

       
      • TNTEverett

        TNTEverett - 2007-04-12

        You will need to have your host reset al lthe file permissions if you can not get it done yourself.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.