Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1684

Improve error message when unable to edit a file because symlink and target do not have matching owner

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.0
    • Component/s: Logging
    • Labels:
      None

      Description

      When trying to edit a file which has a symlink in the path that does not match the owner of the target file errors are produced which indicate we were unable to change into the directory and unable to open the file for writing. This is very misleading.

      Example:
      <pre>
      Failed to chdir into 'path'. (chdir: 'Permission denied')
      Unable to open destination file 'pathtofile' for writing. (fopen: Permission denied)
      </pre>

      The error message should indicate why we did not edit the file.
      Perhaps something like ...
      <pre>
      Unable to edit file 'pathtofile' because the owner of symlink 'pathtosymlink' does not match the owner of 'pathtofile' because a symlink owner should not be able to redirect the root power of CFEngine.
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel