Forum archive 2000-2006

Lars Jensen - login.log

Lars Jensen - login.log

by Arnold Pizer -
Number of replies: 0
inactiveTopiclogin.log topic started 2/25/2006; 3:00:04 AM
last post 2/26/2006; 6:54:07 PM
userLars Jensen - login.log  blueArrow
2/25/2006; 3:00:04 AM (reads: 586, responses: 5)
We did an upgrade to version 2.2 on out test machine. The upgrade was done with cvs, from version 2.1 to 2,.2. When I after the upgrade logged in to the admin course, I received a warning about no permissions to /opt/webwork2/courses/admin/logs/login.log. After checking, I noticed that this file doesn't exist. So I created it and gave write rights to the web server, and the warning went away.

My question is whether this file has to be present in all course/logs directories? And do I have to create it manually.

Lars.

<| Post or View Comments |>


userMichael Gage - Re: login.log  blueArrow
2/25/2006; 11:41:36 AM (reads: 711, responses: 0)
login.log is present in all of the courses. It should usually be created automatically, at least when creating a new course from the web using the CourseAdministration page. The admin course is created manually and may be a special case.

Check that the directory logs is owned by the webserver and that the webserver has write privileges so that it can create login.log if need be. Check this for the course modelCourse in particular since this is often used as a template for creating new courses.

Try creating a new course from the web and let us know if there is a difficulty creating the login.log file.

-- Mike

<| Post or View Comments |>


userLars Jensen - Re: login.log  blueArrow
2/26/2006; 1:20:29 AM (reads: 703, responses: 0)
Hi Mike,

When I add a new course, the login.logs is created as expected. However, I can't login to modelCourse -if I try, I get lots of errors (see below)... Is this because I'm upgrading from 2.1.3 with cvs instead of clean installing?

Warning messages

* DBD::mysql::st execute failed: Table 'webwork.modelCourse_user' doesn't exist at /opt/webwork2/lib/WeBWorK/DB/Schema/SQL.pm line 226.

Error messages

DBD::mysql::st execute failed: Table 'webwork.modelCourse_user' doesn't exist at /opt/webwork2/lib/WeBWorK/DB/Schema/SQL.pm line 226.

Call stack

The information below can help locate the source of the problem. * in WeBWorK::DB::Schema::SQL::gets called at line 202 of /opt/webwork2/lib/WeBWorK/DB/Schema/SQL.pm * in WeBWorK::DB::Schema::SQL::get called at line 1039 of /opt/webwork2/lib/WeBWorK/DB.pm * in WeBWorK::DB::getUser called at line 179 of /opt/webwork2/lib/WeBWorK/Authen.pm * in WeBWorK::Authen::verify called at line 227 of /opt/webwork2/lib/WeBWorK.pm

Request information

Method POST URI /webwork2/modelCourse/ HTTP Headers User-Agent Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/0.8.12 Content-type application/x-www-form-urlencoded Accept text/html, text/plain, audio/basic, audio/x-wav, audio/x-aiff, application/x-troff-man, application/x-tar, application/x-gtar, text/*, application/x-debian-package, */*;q=0.01 Referer http://localhost/webwork2/modelCourse/ Content-length 51 Accept-Encoding gzip, compress Cache-Control no-cache Accept-Language en Pragma no-cache Host localhost

<| Post or View Comments |>


userMichael Gage - Re: login.log  blueArrow
2/26/2006; 12:53:21 PM (reads: 695, responses: 0)
Hi Lars,

The "problem" is that modelCourse is really just a template for new courses so it has a directory structure, but no entry in the sql database (hence all the errors reported by the DB modules). There is probably no need for modelCourse to become a real course. So you can just leave things the way they are.

If you want to create a real course with that name temporarily rename modelCoure to modelCourse2 (you'll need to do that with unix commands) and then create the course modelCourse from the web using modelCourse2 as a template. Then you can delete the directory modelCourse2 using unix commands.

I think that your system is actually working well except for the initial problem of creating the admin course login.log by hand. I think what we need to change is the setup of the initial admin course -- I suspect that we've neglected to properly create the login.log file (or perhaps set the permission on logs/) when we create that initial course from the command line.) I've created a bug report on the issue (#986). You can add additional information to that.

--Mike

<| Post or View Comments |>


userLars Jensen - Re: login.log  blueArrow
2/26/2006; 6:14:51 PM (reads: 686, responses: 0)
Hi Mike,

Thanks for the reply. In think everythingexcept for permissions may have been OK after the cvs update. I first neglected to set the permissions again after having done the CVS update. I think that the problem may have been that the web server did not have write rights in the logs directories. (It seems permissions sometimes gets messed up after a cvs update, and that things first work right again after I have set the file and directory permissions again.)

Lars.

<| Post or View Comments |>


userMichael Gage - Re: login.log  blueArrow
2/26/2006; 6:54:07 PM (reads: 698, responses: 0)
When doing a CVS update it is a good idea to make sure that your umask setting is set to 002. (The umask setting is a safety feature that restricts the permissions given to new files which are being created.) A umask of 077 for example will unduly restrict the permissions of all the new files you download from the cvs. The maximum permission possible will be 700. The maximum permission possible with umask set to 002 is 775.

The command

umask

will tell you your current umask setting

umask 002

will set the umask to 002. Typing

man umask

on the command line will give you more information.

Hope this helps.

-- Mike

<| Post or View Comments |>