public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* /usr/local, /var and */tmp in c:\Users\Public
@ 2014-11-12 17:59 Warren Young
  2014-11-12 21:53 ` cyg Simple
  2014-11-13  9:55 ` Corinna Vinschen
  0 siblings, 2 replies; 27+ messages in thread
From: Warren Young @ 2014-11-12 17:59 UTC (permalink / raw)
  To: cygwin

I didn’t want to derail the discussion about the future of /home with this, so I’m starting a new thread.

I think it would be an improvement to Cygwin if c:\cygwin contained only things that can be reinstalled from your local setup.exe download cache, in the same way that you can nuke "c:\Program Files\Microsoft Office $version” and reinstall without losing anything you created locally.

Further design principles follow from this:

- User data should live in directories that those users are normally allowed to write to.

- Per-machine software and per-machine configuration should be in directories that local Administrators can normally write to.

- Software built from source (/usr/local) should not be in c:\cygwin; it is per-machine configuration, and so should be elsewhere.

- If you tighten down what remains so that normal users only get read permission, it should continue to function, in the same way that normal users on a Linux box don’t need write access to, say, /usr/include.


This /etc/fstab addition mostly accomplishes that:


c:/Users/Public/Cygwin/var         /var         ntfs   auto      0 0
c:/Users/Public/Cygwin/usr/local   /usr/local   ntfs   auto      0 0

c:/Users/Public/Cygwin/tmp         /tmp         ntfs   notexec   0 0
c:/Users/Public/Cygwin/tmp         /usr/tmp     ntfs   notexec   0 0
c:/Users/Public/Cygwin/tmp         /var/tmp     ntfs   notexec   0 0


I propose that this or something like it be added to the default fstab.

It should apply to an existing setup without trouble.  If you already have things in /var and /usr/local, you should copy those trees over first.

The only thing remaining in c:\cygwin that can’t be moved in this way — but which it would be nice to — is /etc.  If you try, you will find that it makes Cygwin asplode; cygwin1.dll needs to find $cygbindir/../etc in order to find /etc/fstab, at the least.

Attempting to create a “shadow /etc” — vaguely like how Linux’s initrd works — also failed here, but it doesn’t seem like a good idea to do this anyway.  It means you now have to remember which of the two etc dirs to edit files in, a management hassle I don’t want.

(Anyone who uses FreeBSD with Ports installed knows this pain, with /etc and /usr/local/etc.  In Cygwin, it would be /etc and /cygdrive/c/cygwin/etc.)

Are there any directories I have missed?
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-11-18 21:28 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 17:59 /usr/local, /var and */tmp in c:\Users\Public Warren Young
2014-11-12 21:53 ` cyg Simple
2014-11-12 22:16   ` Warren Young
2014-11-12 22:43     ` Andrew DeFaria
2014-11-13  0:19       ` Warren Young
2014-11-13  9:33         ` Corinna Vinschen
2014-11-13 21:09           ` Warren Young
2014-11-13 21:30             ` Corinna Vinschen
2014-11-13 21:39               ` Warren Young
2014-11-13 22:17                 ` Corinna Vinschen
2014-11-13 23:20                   ` Andrey Repin
2014-11-13 22:09               ` Corinna Vinschen
2014-11-13 22:20                 ` Warren Young
2014-11-13 22:43                   ` Corinna Vinschen
2014-11-13 23:20                 ` Andrey Repin
2014-11-14  1:05               ` Shaddy Baddah
2014-11-15 17:55             ` Lee
2014-11-15 18:05               ` Jeffrey Altman
2014-11-15 18:41                 ` Lee
2014-11-17 14:36                   ` cyg Simple
2014-11-18 21:28               ` Warren Young
2014-11-14 23:42     ` cyg Simple
2014-11-12 22:35   ` Andrey Repin
2014-11-13  9:55 ` Corinna Vinschen
2014-11-13 21:30   ` Warren Young
2014-11-13 22:22     ` Corinna Vinschen
2014-11-13 22:50     ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).