Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We use Netbeans IDE 7.2 to edit our PHP files.

In the Run Configuration it is configured as Remote Web Site to automatically save the changes on our web server (Centos OS 6.3).

The problem is that every time it is updating the files the owner of the file is changed from apache:apache to userThatUploadedTheFile:users. This causes us problems with SOAP cache files that are configured with apache:apache ownership, and we need to manually chownit back to apache:apache.

We've checked the "Preserve Remote File Permissions" checkbox, so the permissions are not changed, only the owner.

Is there any solution to preserve the ownership ?

share|improve this question

To me this sounds like an issue with how linux users work, as opposed to a Netbeans issue. I can only hypothesize, but what i think is happening is this:

  • Netbeans caches a local copy of the file
  • User edits the file
  • Netbeans wants to upload the file
  • Because a file already exists under a different username, it can't be simply overwritten
  • Netbeans discovers that it has write-access to the remote file, and therefore deletes it so that the updated version can be uploaded.

The way i would work around this would be to use sticky directories, or to user a cronjob to automatically chown the files to apache on regular intervals.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.