Ok ... so I have done some more testing and thought I would also explain why I thought this was necessary:
1. Extra testing - interestingly, even though when the user runs groups command on its own it does not
display the extra group(s), if I submit the following:
Which is the output I expected???
2. Reason for query - i was installing another program, man-pages, and this is done as the man-pages user. As per the LFS instructions the install is very simply:
This now runs the following for loop as per the Makefile contained in the package:
for i in man?; do \
install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
Where DESTDIR is blank and MANDIR=/usr/share/man.
Now as part of LFS you create these directories already and also:
On my system there is an extra step where I change the group to be install and the permissions to be 775 so group can make changes.
On executing the first line in the "for" example above the script hits an error that permission is denied on changing the permissions, hence why I looked
to see what groups had been assigned to the user, in this case man-pages (linux was just shorter to type before), and on typing in the "groups" command
was told that man-pages (and later i found linux also) was not considered in the install group
I have since made a change to the Makefile to test if folder already exists and only then use the install -d -m line.
My question now I guess two fold:
1. Still why the erroneous output when submitting just the "groups" command as normal user?
2. Was this lack of acknowledgement of the install group the reason why the man-pages user was unable to execute the following example:
install -d -m 755 /usr/share/man/man1