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: root privileges

On Thu, Nov 29, 2007 at 09:54:33PM -0200, Jorge Marques Pelizzoni wrote:
>First of all, please believe that I spent almost three hours going through
>the mailing list archives before asking this. It's just that I (and many
>others) have not been able to find a solution there.
>I'm not running a program that tests for rootness in some non-portable
>way. I'm just calling an innocent ioctl directly into cygwin, which tells
>me I need more permissions. Just for clarification, here is the problem
>status &= ~TIOCM_RTS;
>ioctl(fd, TIOCMSET, &status); // returns -EPERM
>Apart from having a privileged (administrator) windows account, should I
>understand (from that all
>cygwin asks for is that I should get things right in /etc/passwd and
>Please take a look at what I've tried so far:
>in /etc/passwd:
>  (original)
>  (1st try) 
>  (2nd try) 
>  (3rd try) 
>in /etc/group (for the 2nd and 3rd tries above, I added the following line):
>  root:S-1-5-32-544:0:
>Finally, I even tried running the program from a "SYSTEM-owned shell", to
>no avail.
>Thanks in advance for any pointers. Cheers,

There is never a case where Cygwin sets errno which implies that you
need "root privileges".  You may need more privileges in the Windows sense
but you don't need to specify root in your /etc/passwd to get the job

Cygwin maps to EPERM from two different Windows errors:  ERROR_CANNOT_MAKE
and ERROR_NOT_OWNER.  I don't know which of these is causing your problems
but maybe that will give you a clue about what is going wrong.

And, as a last resort, there's always the option of looking at the Cygwin
source code.


Unsubscribe info:
Problem reports:

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