Bug 197280 - sysutils/cbsd - nullfs automounted portstree in created jail not mounted read-only
Summary: sysutils/cbsd - nullfs automounted portstree in created jail not mounted read...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-02 19:57 UTC by Kai Gallasch
Modified: 2015-02-03 10:07 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (olevole)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Gallasch 2015-02-02 19:57:05 UTC
When creating a new jail with cbsd and enabled option "mount_ports" /usr/ports inside the jail is writeable. It should be mounted read-only, so it can be safely shared across different jails.

Steps to recreate the problem:

- jconstruct-tui; configure and create jail
- jstart jail
- jlogin jail
- touch /usr/ports/myfile
- rm /usr/ports/myfile
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-02 19:57:05 UTC
Maintainer CC'd
Comment 2 Oleg Ginzburg 2015-02-03 09:42:20 UTC
(In reply to k from comment #0)

If you want /usr/ports ro in jail, do not use "mount_ports" (unset via jset or jconfig) options and put into fstab.local custom mounts, e.g for jail1:

1) /usr/jails/jails-fstab/fstab.jail1.local:
----
/usr/ports /usr/ports nullfs ro 0 0
/usr/jails/jails-data/jail1-data/usr/ports/distfiles /usr/ports/distfiles nullfs rw 0 0
---

2) And don't forget to create jail1 distfiles for RW mount above:
---
mkdir -p /usr/jails/jails-data/jail1-data/usr/ports/distfiles
--


I agree that the default behavior should be RO-mount, this will be fixed in the next version. 

PS: Please use the CBSD bugtracker ( https://github.com/olevole/cbsd/issues ) for next time for  CBSD-related issue. 

Please close this request, this is not ports problem. Thanks.