Mailinglist Archive: opensuse (880 mails)

< Previous Next >
Re: [opensuse] Cant rename/remove /var/tmp in 12.3?
В Tue, 6 Aug 2013 12:04:01 +0200
Josef Wolf <jw@xxxxxxxxxxxxx> пишет:

On Mon, Aug 05, 2013 at 10:09:47PM +0400, Andrey Borzenkov wrote:
В Mon, 5 Aug 2013 15:15:38 +0200
Josef Wolf <jw@xxxxxxxxxxxxx> пишет:

On Fr, Aug 02, 2013 at 10:27:25 +0400, Andrey Borzenkov wrote:
The only case when rename returns EBUSY is when directory is mount
point. systemd creates private tmp directories if service has
PrivateTmp=yes:

Ugh, this seems to be hardwired to /var/tmp. No way to move it to /tmp or
something?

Actually it creates private mounts for both.

The directory for those private mounts seems to be hardwired to
/var/tmp.

No, systemd creates private mounts for both /var/tmp and /tmp.


How comes that I don't see this in /proc/mounts? And lsof don't show it,
too.

bind mounts are not shown in /proc/mounts.

This is not true:

raven:/ # mkdir /tmp/t
raven:/ # mount -obind / /tmp/t
raven:/ # grep /tmp/t /proc/mounts
/dev/mapper/cr_sda8 /tmp/t ext3 rw,relatime,data=ordered 0 0
raven:/ #


a) you did not mount /dev/mapper/cr_sda8 on /tmp/t, did you? So you
have no information about bind mounts there.

b) /proc/mounts is alias for /proc/self/mounts which shows mount points
in *your* namespace. The whole point of namespaces is to restrict
visibility ...

I still fail to understand why /var/tmp is locked down. Isn't
/var/tmp/systemd-private-XXX the mount point?

No, mount point is /var/tmp. Just like in "mount /dev/foo /var/tmp".


Maybe it would be possible, to move those private directories one level
deeper: /tmp/systemd.d/private-XXX or something. That would have two benefits:
- it would keep the /tmp directory clean.
- the /tmp directory would not be locked down .


I'd say anyone needing to change top level filesystem layout should
really do it in single user mode.


It is because the other three services are still running. When I stop all of
them, I can rename even though the GUI is up. The wired thing here is that
/proc/*/mountinfo and /proc/mounts won't show anything.


Which is exactly what I mean under kernel bug.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups