PHP : letting Apache modify FTP uploaded files
Results 1 to 3 of 3

Thread: PHP : letting Apache modify FTP uploaded files

Hybrid View

  1. #1

    PHP : letting Apache modify FTP uploaded files

    Hi,

    I've been Googling my butt off and still found no satisfactory answer to this, so maybe there's someone here who can help.

    I'm on a shared hosting environment and this can't change as it's a client's site.

    If I upload a file via FTP then Apache/PHP has no rights to rename, unlink etc. I need to find the right command to make Apache/PHP the owner so I can rename etc and then set ownership back to FTP (otherwise it can't be deleted via an FTP client later on).

    Any suggestions as I can't use chown on the shared hosting.

    Cheers,
    Niggles
    Last edited by niggles; November 28th, 2008 at 03:04 AM. Reason: typo...

  2. #2
    Developer Extraordinar
    Join Date
    Jul 2002
    Location
    Internets
    Posts
    571
    Who's the current owner of the files? As far as I'm aware, FTP has a chown like command (heck, it might even be named chown).

    You'll probably have to chown the files to the apache user or group. Is there SSH access to the server, it might be easier to do it that way. Also, it might help if you knew the OS (to determine the user/group name for the apache process). Any way you can find that out through support?

    enmand
    Come to UnError.com

  3. #3
    There's no SSH access and it has to be an automatic process as the files are uploaded by the client through a Java-based FTP applet. I then need to strip out bad characters from the filenames after they've been uploaded.

    The weird thing is that the parent folders (created by Apache) can be deleted along with their FTP-uploaded contents, but the individual files are untouchable - no rename, no unlink, no CHMOD.

    It's perplexing and being shared hosting I can't add Apache and FTP to the same group.

    Cheers,
    Niggles

Similar Threads

  1. Installing Apache 1.3 / PHP 4.4
    By FcKgW in forum Other Tutorials Forum
    Replies: 0
    Last Post: April 6th, 2006, 12:17 PM
  2. Securing Free BSD part 4
    By gore in forum The Security Tutorials Forum
    Replies: 0
    Last Post: June 2nd, 2005, 03:05 AM
  3. Apache and PHP security check tool
    By phishphreek in forum Web Security
    Replies: 7
    Last Post: March 8th, 2004, 02:33 AM
  4. The history of the Mac line of Operating systems
    By gore in forum Operating Systems
    Replies: 3
    Last Post: March 7th, 2004, 07:02 AM
  5. Batch File Tut
    By Badassatchu in forum Non-Security Archives
    Replies: 1
    Last Post: November 23rd, 2001, 10:13 PM

Posting Permissions

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

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides