Samba 2.0.7 and FHS conventions

Jeffry Smith smith at
Fri Jan 26 20:01:09 GMT 2001

Dave O'Neill said:
> Here's a patch that takes care of the simple stuff in and
>  It adds an --enable-fhs-compliance flag to configure that
> will do the following:
>    - SBINDIR becomes ${exec_prefix}/sbin
>    - VARDIR becomes /var
>    - logfiles go to $(VARDIR)/log/samba
>    - printers.def and codepages directory go under ${prefix}/share/samba
>    - SWAT html and images go under ${prefix}/share/swat
>    - PRIVATEDIR becomes $(VARDIR)/state/samba/private
>    - LOCKDIR becomes $(VARDIR)/state/samba/locks  (for now... see below)
>    - configfiles go under /etc
> Without the --enable-fhs-compliance flag, everything should end up where
> it always has (though I haven't tested all possible combinations of
> --with-XXXdir= , so there could be possible problems there).
> LOCKDIR looks like a mess to me, so this patch doesn't do much with it
> besides stick it in a more FHS-friendly place.  I was thinking that the
> pidfiles belong in /var/run/, and the tdb files belong somewhere like
> /var/state/samba/data or somesuch.

According to the FHS 2.1 (, I'd 
say LOCKDIR being something like /var/lock/samba.  Another option, per the 2.2 
standard is /var/lib.  To quote from the 2.2 draft standard (link at the above 
"This hierarchy holds state information pertaining to an application or the 
system.  State information is data that programs modify while they run, and 
that pertains to one specific host.  Users must never need to modify files in 
/var/lib to configure a package's operation.

"State information is generally used to preserve the condition of an 
application (or a group of inter-related applications) between invocations and 
between different instances of the same application.  State information should 
generally remain valid after a reboot, should not be logging output, and 
should not be spooled data.

"An application (or a group of inter-related applications) must use a 
subdirectory of /var/lib for its data."



More information about the samba-technical mailing list