Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-107067

Fix chown of skel directory contents for new local users

    XMLWordPrintable

    Details

      JEditor

        Description

        PR: https://github.com/freenas/freenas/pull/5351

        ```
        File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/filesystem.py", line 463, in chown
        self._winacl(data['path'], 'chown', uid, gid, options)
        middlewared.service_exception.CallError: [EFAULT] Winacl chown on path /mnt/ADTest/test_home/testuser/.profile failed with error: [winacl: /mnt/ADTest/test_home/testuser/.profile: chdir() failed.: Not a directory]
        ````

        Before plumbing in middleware permissions api, we were recursively changing owner on each item in the newly copied skel separately. This was preserved in filesystem.chown call, but subsequent changes to ensure that recursive filesystem permissions changes will only occur in the given path caused regression in this account behavior. For now simply, remove the `recursive` flag since the '/usr/share/skel/' only contains files.

          Attachments

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  awalker Andrew Walker
                  Reporter:
                  bugclerk Bug Clerk
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved: