Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 187 of 806  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  66335   Wed Apr 29 18:20:38 2009 Reply Dongwook Jangdwjang@fnal.govQuestionLinux2.7.6Re: elogd runs by a user but not by root

Stefan Ritt wrote:

 

Dongwook Jang wrote:

Hi,

I really don't understand why elogd cannot run by root but it runs by a user.

I've put elog deamon in /etc/init.d. So it didn't bring up, but it runs if I run it by user interactively.

Thanks,

Dongwook

 

That's a security issue. If elogd runs under a user and gets hacked, the hacker obtains just the user rights, which can be limited. If it runs under root, the hacker will automatically get root rights, which is bad. Technically, there is no reason why elogd cannot be run as root. Just put

Usr = root

Grp = root

into elogd.cfg. 

 Hi,

I wonder how others manage this situation because deamons in /etc/init.d is excercuted by root. So I cannot run in /etc/init.d/elogd when the system starts up.

What do you think?

Thanks,

Dongwook

  66336   Thu Apr 30 08:40:43 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.7.6Re: elogd runs by a user but not by root
Dongwook Jang wrote:

 Hi,

I wonder how others manage this situation because deamons in /etc/init.d is excercuted by root. So I cannot run in /etc/init.d/elogd when the system starts up.

What do you think?

Thanks,

Dongwook

The normal situation is that elogd gets started by root under /etc/init.d/, then the configuration file contains "Usr = elog" and "Grp = elog", so after it has been started as root, the program falls back to the "elog" user, which only has restricted rights. 

 

  66338   Thu Apr 30 20:49:03 2009 Reply Dongwook Jangdwjang@fnal.govQuestionLinux2.7.6Re: elogd runs by a user but not by root

Stefan Ritt wrote:
Dongwook Jang wrote:

 Hi,

I wonder how others manage this situation because deamons in /etc/init.d is excercuted by root. So I cannot run in /etc/init.d/elogd when the system starts up.

What do you think?

Thanks,

Dongwook

The normal situation is that elogd gets started by root under /etc/init.d/, then the configuration file contains "Usr = elog" and "Grp = elog", so after it has been started as root, the program falls back to the "elog" user, which only has restricted rights. 

 

 

Now I realized that it is not a problem in /etc/init.d, but deamon itself.

When I run the following command as a root, it didn't run

/mnt/wd500/jnj/products/elog/sbin/elogd -D -c /mnt/wd500/jnj/products/elog/elog/elogd.cfg

But, it runs when I did as a user.

I really don't understand this strange behavior.

Thanks,

  67920   Wed May 20 11:59:59 2015 Reply Andreas Luedekeandreas.luedeke@psi.chBug reportLinux3.1.0Re: elogd moves elog entries
> elogd 3.1.0 moves all elog entries into year-named subdirectories. this feature makes it incompatible with older elogs and so should be clearly mentioned in the documentation,
> in the release announcement and in the release and migration notes. K.O.

That feature is one of the main reasons why the version jumped from 2.x to 3.x. 
A free tip: changes in major revisions do indicate some kind of incompatibility.
But yes, the release documentation by bitbucket is not really that useful: 
it is difficult for me too, to find out what changed with new releases. 
I have to admit here, that I haven't read any GIT tutorial yet.
By the way: you are welcome to contribute to the release documentation!

On your actual problem: to go back to a former version of ELOG you can simply
- stop elogd 3.X, 
- move all entries from the sub-directories one level up, and 
- start the 2.X version of elogd.

I wouldn't really call this an "incompatibility", would you? 
At least you can easily go back without much trouble.

Cheers
Andreas
  67921   Wed May 20 12:52:31 2015 Reply David PilgramDavid.Pilgram@epost.org.ukBug reportLinux3.1.0Re: elogd moves elog entries
> > elogd 3.1.0 moves all elog entries into year-named subdirectories. this feature makes it incompatible with older elogs and so should be clearly mentioned in the documentation,
> > in the release announcement and in the release and migration notes. K.O.
> 
> That feature is one of the main reasons why the version jumped from 2.x to 3.x. 
> A free tip: changes in major revisions do indicate some kind of incompatibility.
> But yes, the release documentation by bitbucket is not really that useful: 
> it is difficult for me too, to find out what changed with new releases. 
> I have to admit here, that I haven't read any GIT tutorial yet.
> By the way: you are welcome to contribute to the release documentation!
> 
> On your actual problem: to go back to a former version of ELOG you can simply
> - stop elogd 3.X, 
> - move all entries from the sub-directories one level up, and 
> - start the 2.X version of elogd.
> 
> I wouldn't really call this an "incompatibility", would you? 
> At least you can easily go back without much trouble.
> 
> Cheers
> Andreas
Stefan told me that the change was because some users were having thousands of yymmdda.log files
in the logbook directories, and that sorting them into subdirectories by year at least did something to bring some 
order.  Possibly to get around the lazy archivers, I suspect.

When I first tried v3.0, I wanted to go back due to some bug or feature, and had to do exactly what Andreas suggested above.

David.
  67922   Wed May 20 18:46:27 2015 Reply Andreas Luedekeandreas.luedeke@psi.chCommentAll3.1.0Re: elogd moves elog entries
> Stefan told me that the change was because some users were having thousands of yymmdda.log files
> in the logbook directories, and that sorting them into subdirectories by year at least did something to bring some 
> order.  Possibly to get around the lazy archivers, I suspect.

I'm actually the culprit, who did ask for it.

If you want to know the full story, here it is:
We have our logbook data of our accelerator operation logbooks on AFS (Andrew File System). 
And apparently AFS has a bloody stupid, hard coded limit: 
the total length of all file names in one directory cannot exceed 64k.
Our operation logbooks go back for more than a decade and do contain many, many, many attachment files.
One day - very unexpectedly - we did hit that limit. 
Removing temporary files (generated picture thumbnails) bought us time, and Stefan was nice enough to upgrade ELOG swiftly for us: a big "Thank You" to Stefan!
  67923   Wed May 20 19:05:43 2015 Reply David PilgramDavid.Pilgram@epost.org.ukCommentAll3.1.0Re: elogd moves elog entries
> > Stefan told me that the change was because some users were having thousands of yymmdda.log files
> > in the logbook directories, and that sorting them into subdirectories by year at least did something to
bring some 
> > order.  Possibly to get around the lazy archivers, I suspect.
> 
> I'm actually the culprit, who did ask for it.
> 
> If you want to know the full story, here it is:
> We have our logbook data of our accelerator operation logbooks on AFS (Andrew File System). 
> And apparently AFS has a bloody stupid, hard coded limit: 
> the total length of all file names in one directory cannot exceed 64k.
> Our operation logbooks go back for more than a decade and do contain many, many, many attachment files.
> One day - very unexpectedly - we did hit that limit. 
> Removing temporary files (generated picture thumbnails) bought us time, and Stefan was nice enough to upgrade
ELOG swiftly for us: a big "Thank You" to Stefan!


Hi Andreas,

I had no intention of causing any offence with my lazy archiving comment - hope I didn't, sorry if I did.  Just
that sometimes I've hit some limit or other, and
entirely due to my lazy archiving - I only get around to do it when I have to, usually when I've hit a limit, or
some other problem (broken links and orphaned
threads being common ones).   

Personally, I would have found it useful to put the attachments into a separate directory - or at least to allow
the possibility.  Elog as it stands sometimes
can, and sometimes cannot cope with that functionality - and even to try means messing around directly with the
yymmdda.log files.  For me it would have saved me
having duplicates of the same large attachment in two or three different logbooks, if I could always reference
the same Master copy of the attachment.  This was
at the time I was severely memory constrained, and in part forced me to change how I had operated elog, so for
me that need isn't as great as it once was.

David.
  67924   Wed May 20 20:03:06 2015 Reply Konstantin Olchanskiolchansk@triumf.caBug reportLinux3.1.0Re: elogd moves elog entries
> Stefan told me that the change was because some users were having thousands of yymmdda.log files
> in the logbook directories

I am one of those users. The elog for the ALPHA experiment at CERN goes back to 2006 or so,
with large volume of messages and huge number of attachments. The MIDAS forum elog goes back to 2003.
The TRIUMF DAQ internal elog goes back to 2001.

I think the new organization is an improvement.

K.O.
ELOG V3.1.5-3fb85fa6