From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by ttr; Fri Sep 13 07:01:55 EDT 2013 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 92D00206D1 for <9front@9front.org>; Fri, 13 Sep 2013 07:01:49 -0400 (EDT) Received: from web1 ([10.202.2.211]) by compute5.internal (MEProxy); Fri, 13 Sep 2013 07:01:49 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:subject:date; s=mesmtp; bh=foAjOWRLmU0kuevRKxST7sH XewY=; b=B3Wpeqb+q2DBZ5kLDweHxfMBEs9aM5f7eWf+qVdG1dDZrzTHXwAxGUR zATZvJF1Fy83vUcC/1/OZOSfeRj0J56aTad7F492jCC+6+caeGM71tV0BEyjotkQ Ed7NiADFN+iJvscQnuAk0MMeOoCuX7gP6X5vlc3eAd7QZJvag1Ak= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:date; s=smtpout; bh=foAjOWRLmU0kuevRKxST7sHXewY=; b=dXhcayJvc9kboLbaRfXzxMDTnjYw IhRuVA714Hh6Xmd14L6jx/1ghcEQX9u+o2Lcks2gAtwUxWwQ+RWvkxDXZFvq7p4P 3U6/g7OpuTRSizjArq2/GowF1x7ZANkp1Elnoq/HSCy9TeDbBPBE/kuoByNlpSCX aFZkdN06B1OjQgQ= Received: by web1.nyi.mail.srv.osa (Postfix, from userid 99) id 711A2F00070; Fri, 13 Sep 2013 07:01:49 -0400 (EDT) Message-Id: <1379070109.6031.21505573.042A6EE4@webmail.messagingengine.com> List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: RESTful service plugin X-Sasl-Enc: EJjL+xzwxiWV/rne5jqOCyAvHHB8EMZDjDly+aK85/Q6 1379070109 From: Ethan Grammatikidis To: 9front@9front.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-d310b333 Subject: Surprise insertion of bind into namespace (anecdote) Date: Fri, 13 Sep 2013 12:01:49 +0100 Just noting a surprise I had with namespaces. I fixed my usage, but thought it so surprising it ought to be shown for other namespace newbs to see. I wanted to bind /n/other/usr/ethan on /usr/ethan so that all dirs and files in the former appeared in the latter; not just tmp. To do this I simply changed the bind in $home/lib/profile, removing the "/tmp" from both args as shown in line 4 below.=20 lib/profile: 1 bind -b $home/bin/rc /bin 2 bind -b $home/bin/$cputype /bin 3 mount -qC /srv/boot /n/other other 4 bind -qa /n/other/usr/$user $home 5 bind -c $home/tmp /tmp ns output: 1 bind -b /usr/ethan/bin/rc /bin=20 2 bind -b /usr/ethan/bin/386 /bin=20 3 mount -C '#s/boot' /n/other other bind /usr/ethan /usr/ethan =E2=86=90 unrequested; breaks my namespace 4 bind -a /n/other/usr/ethan /usr/ethan=20 5 bind -c /n/other/usr/ethan/tmp /tmp=20 I got my dirs from /n/other, I could read and write existing files as normal, but I could no longer create files in $home! I assumed binding with -a would leave the original dir unaffected, but this was false. That extra line in ns output, "bind /usr/ethan /usr/ethan", shows the system doesn't follow this assumption; as soon as I made /usr/ethan a mount point it implicitly lost create permissions. The fix was simple: add "bind -bc $home $home" before line 4. Ns still shows the unrequested bind, it appears before the "bind -bc", but apparently the -c in "bind -bc" overrides it. In brief: binding over a dir which is not already a mountpoint implicitly removes create permission from that dir. Add a "bind -c $dir $dir" to restore create permission.