I seem to have corrupted the group for an entire site. I have no idea what I touched in Virtualmin that would do this....or if the man who is working on setting up the OCPortal PHP site in this site touched something in his CMS settings that could do this to the entire site (I don't think so...)
at any rate... I get a forbidden response from Apache for a site that yesteryday was working fine (fortunately not in production yet)
The normal pattern virtualmin uses is to set the group to be the exact same name as the owner.
well, that's what we had two days ago... the folder /home/apples/
was owned by apples and group was apples
but today I see owner: apples group 516 (blink, huh? what happened)
and if I try to go to www.applesaregood.com I get
Forbidden
OK, so I thinking I must have been asleep and definitely do not do any coding or website configuration during lunar eclipses because if you are bad with documentation you may never remember what you did, ever.
I tried to fix this, acting as root from terminal:
(home)% chown -R apples:apples apples
attempt to change group from 516 to for all directories and files in that folder....but linux replies:
chown: ` apples:apples': invalid group
oops... I'm out of my depth on this one.
Try logging in as root, then
cd /home/sitehomedirectory
, and therechown -R apples:apples *
Exactly what I tried. But the group is deemed invalid:
[root@sat sitehomedirectory]# chown -R apples:apples * chown: `apples:apples': invalid group [root@sat sitehomedirectory]#
Maybe the group or its assignment got deleted. You can check the group's existence and ID with
id apples
andcat /etc/group
.OK id apples returns:
uid=525(apples) gid=516 groups=516
but
cat /etc/group
there is no apples in that list... but following the convention of other user that have virtual servers under Virtual Min control, I would expect to see:
apples:x:516:apache
and in adjacent file dated November 21st named "group-" I do see that line in that file.
So I got brave thinking this should be a simple edit... I added the line to the group file and now when I do
cd /home/sitehomedirectory ls -al
I am now showing all files as apples:apples
so it worked.
But now I have to figure out why all that cause the site to be "forbidden"
www.saivasiddhanta.org
has a valid index.php file in the public_html directory; own and group permissions are set...
but I'm still getting
Forbidden
You don't have permission to access / on this server.
I guess I better go check and see if the default index pages are set -- I could have sworn I set this globally in httpd.conf for all sites to use index.html index.shtml index.php index.irev
I even put a dummy home page in the public_html/index.html
with a simple Hello I'm Here line in it, but still get forbidden.
I'm "closing" this thread as the group issue has been solved... and opening a new topic for "Forbidden"