Bug 4105 - FHS mode enhancements
Summary: FHS mode enhancements
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.23c
Hardware: All Linux
: P3 enhancement
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
Depends on:
Reported: 2006-09-15 10:39 UTC by Peter Eisentraut
Modified: 2017-07-16 23:00 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eisentraut 2006-09-15 10:39:45 UTC
The FHS installation mode needs to a few enhancements to be really FHS-conforming.  The following discussion is based on the fhs.patch that the Debian package has been carrying around for a while.  The patch works well as far as the file-system layout is concerned but it causes some problems, so we'd rather see this work merged upstream before we diverge further.

Before I start, the current version of the fhs.patch can be seen at <http://svn.debian.org/wsvn/pkg-samba/trunk/patches/fhs.patch?op=file&rev=0&sc=0>.

Here are the issues:

(1) Installation of character handling files such as upcase.dat and lowcase.dat in /usr/lib/samba/.  These files are architecture-independent, so they should be installed in /usr/share/samba.  Our patch solves this by introducing a data_path() function that replaces lib_path() in certain cases.

(2) The "lock directory" contains a bunch of things, not all of which are locks.  We have split this up into "lock dir" at /var/run/samba/, "cache dir" at "/var/cache/samba/", and "state dir" at "/var/lib/samba/".

The trick is that we have hardcoded the paths of the latter two, which annoys some users who would like to alter the paths (Debian bugs #247163, #249873).  But the alternative would be adding more configuration options, which we don't want to do unilaterally.  (There is a proposed patch available at Debian bug #268010.)  So it would be nice if you take up that task.

[To see Debian bug #N, go to http://bugs.debian.org/N.]

(3) The "private dir" isn't really a problem by itself, but someone thought that it would be better to map its uses to the "state dir", since that is also read protected.  So perhaps if you buy into the new directory options above, "private dir" can be phased out.

Thanks for considering.
Comment 1 Salvador Fandino 2006-12-03 11:25:39 UTC
this bug causes QEMU (http://fabrice.bellard.free.fr/qemu/) samba support to fail in Debian, as it launchs smbd not as root, but as the user running QEMU with the following configuration:

/usr/sbin/smbd -s /tmp/qemu-smb.$$/smb.conf 

private dir=/tmp/qemu-smb.3146
smb ports=0
socket address=
pid directory=/tmp/qemu-smb.3146
lock directory=/tmp/qemu-smb.3146
log file=/tmp/qemu-smb.3146/log.smbd
smb passwd file=/tmp/qemu-smb.3146/smbpasswd
security = share
read only=no
guest ok=yes

smbd ignores "private dir" and tries to access secrets.tbd and messages.tbd from the hard coded path and fails.

Comment 2 Spammer 2007-04-28 04:21:14 UTC
Created attachment 2501
Comment 3 Karolin Seeger 2009-12-11 08:54:51 UTC
(In reply to comment #0)
> (2) The "lock directory" contains a bunch of things, not all of which are
> locks.  We have split this up into "lock dir" at /var/run/samba/, "cache dir"
> at "/var/cache/samba/", and "state dir" at "/var/lib/samba/".

"cache directory" and "state directory" are smb.conf parameters in Samba 3.4 and newer.
Comment 4 Andrew Bartlett 2017-07-16 23:00:11 UTC
(In reply to Karolin Seeger from comment #3)
Marking as resolved on this basis.  

The Debian FHS patches were all merged into master and are no longer carried in debian.