ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PHP File Uploads Conflicting with FTP Uploads

September 23, 2010 5:26pm

Subscribe [2]
  • #1 / Sep 23, 2010 5:26pm

    abilloo

    9 posts

    I’m having a problem with file permissions and I’m wondering if anyone had any luck resolving this on an Apache server. This is not a version-specific issue—it happens on both EE1.6.9 and EE2.1.x.

    If I try to overwrite an existing file using the EE file upload wizard, I get the following error message:
    “An error was encountered while attempting to replace the file. Please make sure your file directory is writable.”

    The directory permissions are 777, owner: ftp_user / group: usergroup. I can upload a new file, but can’t replace an existing file under the following circumstances:

    1. If a contributor uses the EE file upload wizard to upload a file, the permissions are set as 644, owner: apache / group: apache.

    2. If a user uploads a file via FTP, the permissions are set as 644, owner: ftp_user / group: usergroup.

    Ask a result, apache can’t delete or overwrite files uploaded by ftp_user and ftp_user can’t delete or overwrite files uploaded by apache.

    Anyone have any solutions? I’ve seen this come up on the forums before, but I’ve never seen a posted solution.

    Normally this wouldn’t be a problem, except more and more of our clients have a mix of users—some who prefer FTP and others who prefer EE’s file upload wizard. I need a solution where both FTP users and EE file uploaders can live harmoniously!

  • #2 / Sep 24, 2010 4:37am

    John Henry Donovan

    12339 posts

    nparikh,

    Welcome to the forums 😊

    Can you chat with your host please and mention that anything you upload is being given ownership to apache and you wish to change this to usergroup

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases