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: How do start a cygwin shell session from a script ?


It appears I found my missing shell session settings: the access
rights on the current build and source directories.

The manual build was always run within the user home directory in
cygwin, and cygwin could see the proper access right on all the files
used in the build.

But outside the user home directory, cygwin no longer sees the proper
permissions for directories and files, even though the user running
the cygwin session can very well read and write the files. But cygwin
will list the files with no permissions whatsoever, not even u+r (read
access for the file owner). If I use the Windows `icacls` command to
explicitly add the current user to the ACL on the directory with
inheritable (recursive) "full control" access right, than cygwin can
see the proper access rights too for such directories.

Can this issue maybe be fixed, so cygwin sees the same permissions, on
any files, user that Windows will grant to the current user ?

Thank you,
Timothy Madden

On Mon, May 12, 2014 at 1:12 PM, Timothy Madden <terminatorul@gmail.com> wrote:
> Hello
>
> I have a CMake build script for my application, that among other
> things tries to build libvpx (open-source video codec, see
> webmproject.org).
>
> libvpx library v1.3.0 compiles fine by hand when I open a cygwin
> terminal from the Windows start menu and type in the needed
> `configure`; `make` and `make install` commands.
>
> But when I try to invoke the cygwin shell from my build script, to run
> the same 3 commands with the -lc option to sh.exe (same command line),
> something happens and the build commands no longer work like in the
> real mintty terminal. Then my build fails.
>
> I believe there is something in the cygwin shell session or
> environment that I do not know how to set right when invoking
> $(CYGWIN_DIR)/bin/sh from my CMake script.
>
> Is there a way for me to start a cygwin shell session from the build
> script, that is identical to the one that opens in the mintty terminal
> from the start menu, and run some commands there ?
>
> I checked the environment variables and umask in the mintty terminal
> and in a /bin/sh session that I launch, they are the same in both
> cases. I tried using /bin/sh, /bin/bash, /bin/dash, with both --login
> and -c options. But the automated build always fails, and the manual
> build works.
>
> Thank you,
> Timothy Madden

--
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


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