lnn, a native symlink wrapper script (Was: fstab not automounting...)
Warren Young
warren@etr-usa.com
Fri Oct 18 17:55:00 GMT 2013
On 10/18/2013 01:47, Corinna Vinschen wrote:
> $ CYGWIN=winsymlinks:native ln -s /path/to/your/fstab /etc/fstab
I've wrapped that in a shell script called lnn ("link native"):
#!/bin/sh
CYGWIN=winsymlinks:native ln "$@"
Perhaps Eric Blake will add this to coreutils so we can use the shortcut
in replies to list questions.
I tried to add a test for the SeCreateSymbolicLinkPrivilege capability
before attempting to create the link, but this command doesn't DTRT:
`cygpath -S`/whoami /priv
It doesn't output a line for SeCreateSymbolicLinkPrivilege at all.
The native whoami.exe has an /all flag that *does* show this privilege,
but you only get a line for the symlink priv when you run it as
Administrator! How very medieval: you can't ask Windows what privileges
you have unless you have lots of privileges already.
Complicating the matter is that whoami claims this privilege is *unset*
on this machine, though that may be because I asked the question as
Administrator. Maybe the privilege doesn't need to be set as admin.
Another oddity is that the /all flag complains when run as non-admin:
ERROR: Unable to get user claims information.
...but only when run from a Bash shell. It runs without complaint --
though it still remains silent about the symlink priv -- when run from
cmd.exe or PowerShell.
--
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
More information about the Cygwin
mailing list