After installing Nginx on FreeBSD 8.3 from ports, the configuration files in /usr/local/etc/nginx all have read-only permissions. Is there a reason for this? Am I not supposed to edit them? Or can I safely ignore that fact and modify them anyway?
Nginx – Why are nginx configuration files read-only on FreeBSD
file-permissionsfreebsdnginx
Related Topic
- Freebsd – How to manage and deploy FreeBSD’s ports in a large environment
- Freebsd-update from 8.3-RELEASE to 9.0-RELEASE: How to deal with dozens of diffs
- Freebsd – Apache not running from rc.d on FreeBSD
- Cron – splitting crontab into several files under FreeBSD
- Freebsd – How to put FreeBSD configuration under Revision Control
- Nginx gzip_static – Why Are Non-Compressed Files Required?
Best Answer
I don't use nginx (and therefore don't use the port), but looking at the port it does the "standard" thing of copying the
dist
files over as the "live" files for a fresh install.The maintainer specified the
-p
flag in doing this, which preserves the file mode, so the resulting "live" files are read-only.There is no reason you can't make these files writeable by a specific user/group, or just edit them as root and ignore the lack of write permissions.
If you think this behavior is undesirable you should file a PR - it would be a pretty easy thing for the port maintainer to change.
Chances of getting it changed go up dramatically if you provide a patch (the offending file in the port is
pkg-plist
, and more information on how that file works can be found in The Porter's Handbook.)