You are not logged in.
Hello
I have to create some debian packages out of a Cygwin environment. To Create those packages properly, chown root:root has to be set for each file (it seems). Otherwise lintian will throw warnings.
Since there is no root user in cygwin, this is a bit of a problem and thus my Questian:
How is the owner set to a file on the file? Is it simply by name like in the /etc/groups file or is it by UID? Can i fake or force this, since the UID of root will always be 0?
Regards, Dove
Offline
Have you searched for a solution to your problem on the Internet? A quick search for "cygwin change file ownership" gave me this and many other results. A lot of people use cygwin, so someone's probably run into this problem before.
Offline
i may not have made my problem clear enough.
Setting file permissions is not an issue. The problem is that i need to set the owner of a file to root while there is no user named root on the system. I could create such a user in windows but its UID couldn't possibly be 0.
So the question is:
On a system without root how do i do this:
chown root:root foo
Plus to my other question:
How is the owner of a file saved. Ist it by name or by UID?
Offline
http://stackoverflow.com/questions/4090 … -in-cygwin
Seems rather relevant, and was the first google result for "cygwin root user"
More generally, user and group ownership are stored as numeric values. Files like /etc/passwd and /etc/group merely serve to provide mappings of human readable names to numbers.
Offline
Have you tried:
chown 0.0 file
I am not sure if you have to be logged in as a user with (Windoze) administrator privileges to use chown in Cygwin. (On the machine where I use it, I usually have those.) Anyway, under Linux chown accepts non-existent user IDs when given numerically.
The more general solution to this class of problems is of course fakeroot (1), but I do not know if Cygwin provides it.
Officer, I had to drive home - I was way too drunk to teleport!
Offline