Skip to contentSkip to conversation

splitting configuration from the spool/queue

DISCUSSION Søren Boll Overgaard 4 participants 13 messages Sep 7, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

This may or may not have been covered earlier, but I couldn't seem to find anything in the list archive, so here goes.

Is there any particular reason why the list configuration is situated in the same directory structure as the list queue and archive? According to the FHS[1], list configuration should be somewhere under /etc while the queue and archive should be somewhere under /var. This would have the added benefit that list configuration could be stored on a read-only file system for added security.

Comments? Thoughts? Flames?

[1] http://www.pathname.com/fhs/

Signature · 4 lines
Søren O.                                           ,''`.
                                                   : :' :
GPG key id: 0x1EB2DE66                             `. `'
GPG signed mail preferred.                           `-
#1 lore raw
Quoted 2 lines · Søren Boll Overgaard

Is there any particular reason why the list configuration is situated in the same directory structure as the list queue and archive?

I think there where two reasons for this decision: The first is that having the configuration in /etc would make a chroot'ed environment impossible, and the second is to have each list in a single directory.

If you want to store it in /etc you can do so, and just make symlinks in /var/spool/mlmmj.

Morten

Signature · 2 lines
Morten K. Poulsen <[email protected]>
http://www.afdelingp.dk/
#2 lore raw
In reply to Søren Boll Overgaard
Quoted 5 lines · Søren Boll Overgaard

Is there any particular reason why the list configuration is situated in the same directory structure as the list queue and archive? According to the FHS[1], list configuration should be somewhere under /etc while the queue and archive should be somewhere under /var. This would have the added benefit that list configuration could be stored on a read-only file system for added security.

Personally I find it convenient to have everything related to a list located under the same directory.

I don't see a problem in adding optional support for having the control dir located in a seperate location but the current directory layout should continue to be the default to avoid breaking existing configurations.

Signature · 1 line
Christian Laursen
#3 lore raw
In reply to Søren Boll Overgaard
Quoted 10 lines · Christian Laursen
Quoted 7 lines

Is there any particular reason why the list configuration is situated in the same directory structure as the list queue and archive? According to the FHS[1], list configuration should be somewhere under /etc while the queue and archive should be somewhere under /var. This would have the added benefit that list configuration could be stored on a read-only file system for added security.

Personally I find it convenient to have everything related to a list located under the same directory.

Ditto. Also backups, moving lists etc. are simplified.

Quoted 4 lines

I don't see a problem in adding optional support for having the control dir located in a seperate location but the current directory layout should continue to be the default to avoid breaking existing configurations.

We might add that if it's really needed, but as morten said, it's entirely possible to symlink to a readonly place in /etc. Will make the webinterfaces useless though.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#4 lore raw
In reply to Søren Boll Overgaard

Hey,

Quoted 6 lines · Morten K. Poulsen
Quoted 2 lines

Is there any particular reason why the list configuration is situated in the same directory structure as the list queue and archive?

I think there where two reasons for this decision: The first is that having the configuration in /etc would make a chroot'ed environment impossible, and the second is to have each list in a single directory.

Would you be interested in a patch for mlmmj-make-ml.sh which requires the user to decide if she wants to make links from /etc/mlmmj/lists/<listname> to /var/spool/mlmmj/control or some such?

Quoted 2 lines

If you want to store it in /etc you can do so, and just make symlinks in /var/spool/mlmmj.

Well, making the symlinks from /var to /etc would break future introductions of calls to chroot(), so symlinks, if used, should probably be from /etc to /var, and not vice-versa.

Signature · 4 lines
Søren O.                                           ,''`.
                                                   : :' :
GPG key id: 0x1EB2DE66                             `. `'
GPG signed mail preferred.                           `-
#5 lore raw
In reply to Søren Boll Overgaard
Quoted 4 lines · Søren Boll Overgaard
Quoted 4 lines
Quoted 3 lines

Is there any particular reason why the list configuration is situated in the same directory structure as the list queue and archive?

Quoted 8 lines
Quoted 4 lines

I think there where two reasons for this decision: The first is that having the configuration in /etc would make a chroot'ed environment impossible, and the second is to have each list in a single directory.

Would you be interested in a patch for mlmmj-make-ml.sh which requires the user to decide if she wants to make links from /etc/mlmmj/lists/<listname> to /var/spool/mlmmj/control or some such?

I think such a patch belongs with the distributions, since FHS is Linux specific, and mlmmj is not. It's just like the patch to mlmmj-make-ml.sh to make it know where the listtexts are installed.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#6 lore raw
In reply to Søren Boll Overgaard
Quoted 3 lines · Søren Boll Overgaard

Well, making the symlinks from /var to /etc would break future introductions of calls to chroot(), so symlinks, if used, should probably be from /etc to /var, and not vice-versa.

If the symlinks go from /etc to /var, how can the config files be on a read-only mounted filesystem?

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#7 lore raw
In reply to Søren Boll Overgaard
Quoted 6 lines · Mads Martin Joergensen
Quoted 3 lines

Well, making the symlinks from /var to /etc would break future introductions of calls to chroot(), so symlinks, if used, should probably be from /etc to /var, and not vice-versa.

If the symlinks go from /etc to /var, how can the config files be on a read-only mounted filesystem?

Obviously the system would need to be made read-write during configuration changes. To my knowledge that's not unreasonable for /etc on a production server.

Signature · 4 lines
Søren O.                                           ,''`.
                                                   : :' :
GPG key id: 0x1EB2DE66                             `. `'
GPG signed mail preferred.                           `-
#8 lore raw
In reply to Søren Boll Overgaard
Quoted 8 lines · Mads Martin Joergensen
Quoted 4 lines

Would you be interested in a patch for mlmmj-make-ml.sh which requires the user to decide if she wants to make links from /etc/mlmmj/lists/<listname> to /var/spool/mlmmj/control or some such?

I think such a patch belongs with the distributions, since FHS is Linux specific, and mlmmj is not. It's just like the patch to mlmmj-make-ml.sh to make it know where the listtexts are installed.

That's fair enough. I will go ahead and build a set of debian specific patches.

Signature · 4 lines
Søren O.                                           ,''`.
                                                   : :' :
GPG key id: 0x1EB2DE66                             `. `'
GPG signed mail preferred.                           `-
#9 lore raw
In reply to Søren Boll Overgaard
Quoted 10 lines · Søren Boll Overgaard
Quoted 6 lines
Quoted 3 lines

Well, making the symlinks from /var to /etc would break future introductions of calls to chroot(), so symlinks, if used, should probably be from /etc to /var, and not vice-versa.

If the symlinks go from /etc to /var, how can the config files be on a read-only mounted filesystem?

Obviously the system would need to be made read-write during configuration changes. To my knowledge that's not unreasonable for /etc on a production server.

Yeah, that's pretty normal I think.

Disclaimer: it's entirely possible I've gotten this messed up in my
head--it's know to happen before :)

What I meant is: if the symlinks are in /etc pointing to the actual files below /var/.../control holding the data, then the config files are not on the read-only file system, are they?

But that's only a problem in the case of chroot environments of course.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#10 lore raw
In reply to Søren Boll Overgaard
Quoted 13 lines · Mads Martin Joergensen
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

Well, making the symlinks from /var to /etc would break future introductions of calls to chroot(), so symlinks, if used, should probably be from /etc to /var, and not vice-versa.

If the symlinks go from /etc to /var, how can the config files be on a read-only mounted filesystem?

Obviously the system would need to be made read-write during configuration changes. To my knowledge that's not unreasonable for /etc on a production server.

Yeah, that's pretty normal I think.

Quoted 8 lines

Disclaimer: it's entirely possible I've gotten this messed up in my
head--it's know to happen before :)

What I meant is: if the symlinks are in /etc pointing to the actual files below /var/.../control holding the data, then the config files are not on the read-only file system, are they?

But that's only a problem in the case of chroot environments of course.

I think we agree, even if the terminology is a little fuzzy :)

If the actual files are in /etc and symlinks are made from /var/.. to /etc, then problems will arise if chroot'ing is introduced. This is easily fixed though, as one can just make the links hard, and thus accessible from with a chroot. I find this option the most appealing, and according to the FHS it appears to be the most correct one.

If the situation was reversed, it's as you describe it. What's your opionion on this?

Either way, sorry for the confusion.

Signature · 4 lines
Søren O.                                           ,''`.
                                                   : :' :
GPG key id: 0x1EB2DE66                             `. `'
GPG signed mail preferred.                           `-
#11 lore raw
In reply to Søren Boll Overgaard
Quoted 11 lines · Søren Boll Overgaard
Quoted 5 lines

What I meant is: if the symlinks are in /etc pointing to the actual files below /var/.../control holding the data, then the config files are not on the read-only file system, are they?

But that's only a problem in the case of chroot environments of course.

I think we agree, even if the terminology is a little fuzzy :)

If the actual files are in /etc and symlinks are made from /var/.. to /etc, then problems will arise if chroot'ing is introduced. This is easily fixed though, as one can just make the links hard

No, you can not make hard links across partitions, and you can not make only some part of a partition read-only.

So:
- All files in /var, symlinks in /etc, chroot
- Some files in /var, some in /etc, symlinks in /var, NO chroot

Morten

Signature · 2 lines
Morten K. Poulsen <[email protected]>
http://www.afdelingp.dk/
#12 lore raw
In reply to Søren Boll Overgaard
Quoted 3 lines · Morten K. Poulsen

No, you can not make hard links across partitions, and you can not make only some part of a partition read-only.

My bad.

Quoted 3 lines

So:
- All files in /var, symlinks in /etc, chroot
- Some files in /var, some in /etc, symlinks in /var, NO chroot

Strictly speaking, you could delay the call to chroot() until after the configuration had been loaded from /etc/.. That would require verification that the actual loading routine couldn't cause errors, but still. Anyway, if you are happy with having stuff under /var, I won't argue with you :)

Signature · 4 lines
Søren O.                                           ,''`.
                                                   : :' :
GPG key id: 0x1EB2DE66                             `. `'
GPG signed mail preferred.                           `-