Some packages require certain ownership of or permissions on directories
in /var/run. These packages chown/chmod the directories in the
postinst. As we all know Ubuntu has /var/run on a tmpfs, and as such we
move code to do this from the postinst to the init script.
The correct thing to do is to guard these operations by a call to
dpkg-statoverride to allow the admin to override permissions. However, I
have seen cases where we have a bare chown/chmod in the init script, so
we don't support that.
Is this something that we want to support? Does it even make any
sense for directories on a tmpfs?
Thanks,
James
P.S. it is important to actually move code that changes
permissions on /var/run directories from the postinst to the init
script, i.e. don't leave it in the postinst. This is because a reboot
between the package being unpacked and configured will cause an error
as the directory will not be present. If the postinst needs the
directory before running init script then have an explicit mkdir in
the postinst, and don't rely on the directory being shipped in the
package.
--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
12-07-2008, 04:04 AM
Scott James Remnant
init scripts, /var/run and dpkg-statoverride
On Mon, 2008-11-24 at 15:26 +0000, James Westby wrote:
> Some packages require certain ownership of or permissions on directories
> in /var/run. These packages chown/chmod the directories in the
> postinst. As we all know Ubuntu has /var/run on a tmpfs, and as such we
> move code to do this from the postinst to the init script.
>
> The correct thing to do is to guard these operations by a call to
> dpkg-statoverride to allow the admin to override permissions. However, I
> have seen cases where we have a bare chown/chmod in the init script, so
> we don't support that.
>
> Is this something that we want to support? Does it even make any
> sense for directories on a tmpfs?
>
I don't think it makes any sense to support.
Scott
--
Scott James Remnant
scott@canonical.com
--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel