You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :-(
The text was updated successfully, but these errors were encountered:
Firstly I think the filesets chould be chowned to their users on creation?
This might be doable. No benefit from a script clarity perspective, but indeed more close to real world usage.
However, the current example does not fit at all (would cats or dogs own the pets fileset?). I need your help how to change.
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?
Again I understand the use case, but adding this is for sure complicating the script. If you have an idea how to change in a smart way, Pull Requests are very much appreciated.
In my case script-05.sh exited during the file creation loop (no error message), leaving all directories and files still owned by root :-(
That should not happen and in fact never happened during my tests, so without any hint where it failed, nothing that can be done here.
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:
sudo
tosu $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 :-(The text was updated successfully, but these errors were encountered: