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 :-(