public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin 1.5.25 issue: Crontab on Windows
@ 2013-11-25  8:57 Aleksander Panayotov
  2013-11-25 16:20 ` Warren Young
  2013-11-26  9:27 ` Aleksander Panayotov
  0 siblings, 2 replies; 6+ messages in thread
From: Aleksander Panayotov @ 2013-11-25  8:57 UTC (permalink / raw)
  To: cygwin

Hello,


I am writing to you in order to report a strange issue I encountered
while using Cygwin 1.5.25 on Windows 2k8 R2 both SE SP1 & EE SP1.

Introduction

Cygwin installation is embedded in the installation of another
product. Because of that, it is run with the same credentials as the
installation the Cygwin is embedded in. I am using a rather simplified
cygwin package containing the most basic functions.

Main content

The crontab utility, provided by Cygwin, is used to run maintenace
scripts. Since everything is done during the installation, I
encountered the following issue:

1) The installation of the product is initialized by the user X

2) During installation on the product, Cygwin installation is also
initialized by the user X

3) The user X is not allowed to use the -u option when installing the
cron service // cygrunsrv -I -u X - results in a deadlock, probably
because of the lack of permissions of the user X.

4) After finishing the installation of both cygwin & cron, some
cronjobs are added.

5) Having the cron service installed with the default user (SYSTEM),
makes it impossible to add the cronjobs to the user X' crontab.

6) When checking user X' crontab, the jobs added are shown, but even
if some of the entries are removed, the jobs continue to run (probably
because they are added using the SYSTEM user).

Summary

The cron service is installed with the default user (SYSTEM) since
there are no permissions to use -u. Jobs are also added with the user
SYSTEM. The user X cannot edit SYSTEM's cron entries and those
override everything else.

Conclusion

I would like to know if there is a way to work this around and if not,
what should I do in order to have proper deployment of the
cronjobs/cron service. I have also tested this on Cygwin 1.7.5 and I
observe the same behaviour.


Best regards,

A. Panayotov

--
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] 6+ messages in thread

* Re: Cygwin 1.5.25 issue: Crontab on Windows
  2013-11-25  8:57 Cygwin 1.5.25 issue: Crontab on Windows Aleksander Panayotov
@ 2013-11-25 16:20 ` Warren Young
  2013-11-25 16:32   ` Christopher Faylor
  2013-11-26  9:27 ` Aleksander Panayotov
  1 sibling, 1 reply; 6+ messages in thread
From: Warren Young @ 2013-11-25 16:20 UTC (permalink / raw)
  To: Cygwin-L

On 11/25/2013 01:57, Aleksander Panayotov wrote:
>
> I have also tested this on Cygwin 1.7.5 and I
> observe the same behaviour.

The only thing that matters on this list is whether it happens with the 
*current* version.  If not, the answer is simple: upgrade.

By the way, you probably lost 95% of your potential help by putting 
1.5.x in the subject line.  No one is going to fix a problem in such an 
old version.  1.7.x became current nearly four *years* ago.[1]  1.7.5 
isn't much better, being over three years old.[2]



[1] http://goo.gl/PlioHj
[2] http://goo.gl/HnxVLt

--
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] 6+ messages in thread

* Re: Cygwin 1.5.25 issue: Crontab on Windows
  2013-11-25 16:20 ` Warren Young
@ 2013-11-25 16:32   ` Christopher Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2013-11-25 16:32 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 25, 2013 at 09:20:25AM -0700, Warren Young wrote:
>On 11/25/2013 01:57, Aleksander Panayotov wrote:
>>
>> I have also tested this on Cygwin 1.7.5 and I
>> observe the same behaviour.
>
>The only thing that matters on this list is whether it happens with the 
>*current* version.  If not, the answer is simple: upgrade.
>
>By the way, you probably lost 95% of your potential help by putting 
>1.5.x in the subject line.  No one is going to fix a problem in such an 
>old version.  1.7.x became current nearly four *years* ago.[1]  1.7.5 
>isn't much better, being over three years old.[2]

Heh.  I actually read the report because I read 1.5.25 as 1.7.25.  Thanks
for clarifying.

What Warren says is right.  The options are going to be upgrade or debug
the issue yourself.

cgf

--
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] 6+ messages in thread

* Re: Cygwin 1.5.25 issue: Crontab on Windows
  2013-11-25  8:57 Cygwin 1.5.25 issue: Crontab on Windows Aleksander Panayotov
  2013-11-25 16:20 ` Warren Young
@ 2013-11-26  9:27 ` Aleksander Panayotov
  2013-11-26 17:01   ` Cygwin 1.7.25 issue: Crontab on Windows (was ...1.5.25...) Warren Young
  2013-11-26 18:44   ` Cygwin 1.5.25 issue: Crontab on Windows Christopher Faylor
  1 sibling, 2 replies; 6+ messages in thread
From: Aleksander Panayotov @ 2013-11-26  9:27 UTC (permalink / raw)
  To: cygwin

It was actually a typo - a missing "2". What I meant was that I tested
it with the 1.7.25 version (the latest one that was on your website
last week) and not with 1.7.5.

On 25 November 2013 10:57, Aleksander Panayotov
<aleksander.panayotov@gmail.com> wrote:
> Hello,
>
>
> I am writing to you in order to report a strange issue I encountered
> while using Cygwin 1.5.25 on Windows 2k8 R2 both SE SP1 & EE SP1.
>
> Introduction
>
> Cygwin installation is embedded in the installation of another
> product. Because of that, it is run with the same credentials as the
> installation the Cygwin is embedded in. I am using a rather simplified
> cygwin package containing the most basic functions.
>
> Main content
>
> The crontab utility, provided by Cygwin, is used to run maintenace
> scripts. Since everything is done during the installation, I
> encountered the following issue:
>
> 1) The installation of the product is initialized by the user X
>
> 2) During installation on the product, Cygwin installation is also
> initialized by the user X
>
> 3) The user X is not allowed to use the -u option when installing the
> cron service // cygrunsrv -I -u X - results in a deadlock, probably
> because of the lack of permissions of the user X.
>
> 4) After finishing the installation of both cygwin & cron, some
> cronjobs are added.
>
> 5) Having the cron service installed with the default user (SYSTEM),
> makes it impossible to add the cronjobs to the user X' crontab.
>
> 6) When checking user X' crontab, the jobs added are shown, but even
> if some of the entries are removed, the jobs continue to run (probably
> because they are added using the SYSTEM user).
>
> Summary
>
> The cron service is installed with the default user (SYSTEM) since
> there are no permissions to use -u. Jobs are also added with the user
> SYSTEM. The user X cannot edit SYSTEM's cron entries and those
> override everything else.
>
> Conclusion
>
> I would like to know if there is a way to work this around and if not,
> what should I do in order to have proper deployment of the
> cronjobs/cron service. I have also tested this on Cygwin 1.7.5 and I
> observe the same behaviour.
>
>
> Best regards,
>
> A. Panayotov

--
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] 6+ messages in thread

* Re: Cygwin 1.7.25 issue: Crontab on Windows (was ...1.5.25...)
  2013-11-26  9:27 ` Aleksander Panayotov
@ 2013-11-26 17:01   ` Warren Young
  2013-11-26 18:44   ` Cygwin 1.5.25 issue: Crontab on Windows Christopher Faylor
  1 sibling, 0 replies; 6+ messages in thread
From: Warren Young @ 2013-11-26 17:01 UTC (permalink / raw)
  To: Cygwin-L

On 11/26/2013 02:27, Aleksander Panayotov wrote:
> It was actually a typo - a missing "2". What I meant was that I tested
> it with the 1.7.25 version (the latest one that was on your website
> last week) and not with 1.7.5.

Okay, then.

The standard solution here is to set your installer to require UAC. 
There's a flag for this in MSI, and probably in any other reasonable 
software installation system.  That elevates the actual install process 
to Admin privileges, so that when it launches cygrunsrv, it will have 
the permissions it needs to handle the -u flag correctly.

I would suggest not shipping a private copy of Cygwin, but instead ship 
Cygwin's setup.exe and do your custom minimal installation via its 
command line interface.  That way, you don't have to keep your shipped 
version up-to-date, you don't have to worry about source code 
distribution for anything but setup.exe, and you can take advantage of 
the auto-UAC features of setup.exe.

That latter feature might be enough to sway you all by itself.  It means 
you can run the installation as a normal user, but if they have the 
ability to do UAC authentication, Cygwin's setup.exe will elevate *that 
part* of the installation to Admin level automatically.

--
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] 6+ messages in thread

* Re: Cygwin 1.5.25 issue: Crontab on Windows
  2013-11-26  9:27 ` Aleksander Panayotov
  2013-11-26 17:01   ` Cygwin 1.7.25 issue: Crontab on Windows (was ...1.5.25...) Warren Young
@ 2013-11-26 18:44   ` Christopher Faylor
  1 sibling, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2013-11-26 18:44 UTC (permalink / raw)
  To: cygwin

Btw, you mention an "embedded product".  I'm hoping that you are aware
of GPL restrictions for Cygwin which require you to provide source code
for the product:

http://cygwin.com/licensing.html

If you are providing binaries to third parties you must also make sure
that they are aware that they can procure sources *from you*.

--
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] 6+ messages in thread

end of thread, other threads:[~2013-11-26 18:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25  8:57 Cygwin 1.5.25 issue: Crontab on Windows Aleksander Panayotov
2013-11-25 16:20 ` Warren Young
2013-11-25 16:32   ` Christopher Faylor
2013-11-26  9:27 ` Aleksander Panayotov
2013-11-26 17:01   ` Cygwin 1.7.25 issue: Crontab on Windows (was ...1.5.25...) Warren Young
2013-11-26 18:44   ` Cygwin 1.5.25 issue: Crontab on Windows Christopher Faylor

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