Skip to content

demo/script-05.sh should set ownership of directories before writing files to them? #60

@dannyk96

Description

@dannyk96

The demo script demo/script-05,sh has this order:
1 Create 8 user accounts
2 Create 2 filesets and 6 subdirectories below them
3 Loop and create lots of files in these directories as root
4 Chown the 2 filesets
5 Chown the created files to the new users

May I suggest two things to improve this:

  • Firstly I think the filesets chould be chowned to their users on creation?
  • Secondly would it be better to create the files as the actual users, rather than create as root (ie change the sudo to su $user and chown later. ie much more like the real world case?

In my case script-05.sh exited during the file creation loop (no error message), leaving all directories and files still owned by root :-(

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions