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

depth => 0 is ignored by perms file attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unconfirmed
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Promise type: files
    • Labels:
      None
    • Platform:
      RHEL or CentOS
    • Steps to reproduce:
      Manual steps provided

      Description

      In the following code, recurse_with_base("0") and recurse_with_base("1") have the same effect. All the content of the base directory is affected in addition to the base itself, whereas the expected action for depth 0 is to affect only the base directory.

      <pre>
      files:
      "/home/amousset/perms"
      create => "false",
      perms => mog("640", "amousset", "root"),
      depth_search => recurse_with_base("0");
      </pre>

      Before:

      <pre>

      1. ll -R perms
        perms:
        total 4.0K
        drwxr-xr-x. 2 root root 4.0K Jun 24 16:08 dir/
        rw-rr-. 1 root root 0 Jun 24 16:08 file

      perms/dir:
      total 0
      rw-rr-. 1 root root 0 Jun 24 16:08 file
      </pre>

      After running the previous example:

      <pre>

      1. ll -R perms
        perms:
        total 4.0K
        drwxr-x---. 2 amousset root 4.0K Jun 24 16:08 dir/
        rw-r----. 1 amousset root 0 Jun 24 16:08 file

      perms/dir:
      total 0
      rw-rr-. 1 root root 0 Jun 24 16:08 file
      </pre>

      The problem does not exist for example with copy_from (the copy of the content of the base directory is not made if depth is set to 0).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              amousset Alexis Mousset
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel