This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: lnn, a native symlink wrapper script (Was: fstab not automounting...)


On Oct 18 13:08, Warren wrote:
> On 10/18/2013 12:24, Corinna Vinschen wrote:
> >
> >- The user token contains a privilege, but it's disabled.
> >
> >   The process can not perform the dangerous action secured by that
> >   privilege.  But it can enable the privilege if it wants to perform
> >   that action.
> 
> Thanks for the explanation.
> 
> I tried two machines here and apparently the privilege can be set on
> both of them without being Administrator,

Are you sure?  Did you test it by running

  $ CYGWIN=winsymlinks:native ln -s foo bar

by any chance?  If so, there's a surprise waiting for you.  The symlinks
will be generated, but they are Cygwin default symlinks, not native
symlinks.  Try this instead

  $ CYGWIN=winsymlinks:nativestrict ln -s foo bar

and see the user's guide:

  http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks
  http://cygwin.com/cygwin-ug-net/using-cygwinenv.html

> so I don't even know if
> it's worth chasing this test.  That is, I don't know if ln(1) prints
> a helpful error when the link cannot be created.  If it says
> something vague like "permission denied", I'm thinking it would be
> helpful to pre-diagnose the problem in the wrapper script.

No, it's the much better "Operation not permitted" (EPERM).  It's
perfectly matching the situation so I don't think any further diagnosis
is necessary (unless you want to explain the user exactly what's going
on).  But still, it will only occur with CYGWIN=winsymlinks:nativestrict,
see above.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpdDwhyKOtH7.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]