Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Posts
    392

    Cannot delete files on server

    When I log into my FTP account, I don't seem to be able to delete any files or folders. I get the following error:

    550 Rename: Permission denied

    or

    550 myfile.txt: Permission denied

    Why is this happening?

    Jon

  2. #2
    You can test a few things.

    Upload a new file and try to rename it. If you can do this , then contact your host. It seems like the files might not be owned by your user.

    If you are not able to upload any files, then contact it's an issue at the hosts end.
    Datums Internet Solutions, LLC
    Systems Engineering & Managed Hosting Services
    Complex Hosting Consultants

  3. #3
    Join Date
    Nov 2002
    Posts
    392
    I can upload the files but cannot change them.

    Interestingly enough, it only applies to my uploads/completed/ folder and not my root folder. Hmmm, any clues there?

    Regards,

    Jon
    Last edited by Jon12345; 04-01-2004 at 11:26 AM.

  4. #4
    Join Date
    Nov 2002
    Posts
    392
    My host said:

    "the files/folders in your 'completed' subfolder was owned by 'nobody' user, we have changed permissions, please try now."

    Thats fine. Except any new files that are uploaded I cannot delete!

    There is a Form where someone enters their enquiry. They can browse to their file and then upload. It is written in PHP. The file gets uploaded.

    Anyone know how I can get things set so that the file becomes deletable when using a script? I presume it is a php code thing.

    Regards,

    Jon

  5. #5
    Join Date
    Feb 2004
    Posts
    772
    Hi Jon,

    I think this may be a Security problem. Please check it out you have proper permission in completed sub folder.Go to the physical location and then check that appropriate user having modify permission with that folder.

    Regards,

    Bright
    24 / 7 Technical Support
    Bright Info Solutions

  6. #6
    Join Date
    Oct 2002
    Location
    Brooklyn NY
    Posts
    817
    Ask your host if they can set a cron to chown your subdir so you get the proper ownership back. There is also something called phpsuexec that is supposed to keep the permissions of the user when uploaded via php script.
    Why do they call them fingers? I never seen them fing. Oh, there they go.

  7. #7
    Join Date
    Jun 2002
    Location
    Sherbrooke, Québec
    Posts
    182
    Originally posted by Jon12345
    My host said:

    "the files/folders in your 'completed' subfolder was owned by 'nobody' user, we have changed permissions, please try now."

    Thats fine. Except any new files that are uploaded I cannot delete!

    There is a Form where someone enters their enquiry. They can browse to their file and then upload. It is written in PHP. The file gets uploaded.

    Anyone know how I can get things set so that the file becomes deletable when using a script? I presume it is a php code thing.

    Regards,

    Jon
    You should have mentionned earlier that the files were getting uploaded through PHP, not FTP.

    When you upload files through FTP they are created with the logged in user for owner, his group as group, and the mask (set by the server) for permissions. Exactly the same happens with PHP uploaded files, exept that you don't actually log in, so the files is created by PHP directly. It would appear that at your site PHP runs as 'nobody'. Since only the owner of a file can delete it (and you can't log in as nobody obviously) you can't do that.

    The solution: since PHP created them, it can delete them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •