This is the mail archive of the
mailing list for the Cygwin project.
Set uid and gid of a file to "root"
- From: "Stern, Eli" <eli dot stern at ti dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Wed, 28 Oct 2009 10:29:32 +0100
- Subject: Set uid and gid of a file to "root"
I am developing a diskless embedded system (aka the target) that uses Linux as its Operating system. The target connects directly to my PC (XP).
I would like to boot the target to an NFS server, where is will get the file system.
I would like to use the Cygwin NFS server in the following manner:
- Create the target file system on the host (the build host is Linux)
- Save it to the NFS server. This can be done as part of the build process (send the build results to the NFS server instead of storing locally).
- Boot the target via NFS
I am currently encountering the following problem:
When the file system is created, some special files (actually devices), e.g. /dev/console and /dev/tts/0, are craeted using "sudo mknod". When this is done to a regular Linux directory, these devices are create with uid and gid as "root". But when created on the Cygwin NFS server, they are created with my uid and gid.
Later when the target tries to boot from the NFS, it will not use these devices, since they are not owned by "root", and the boot fails.
How can I get these devices to be owned by "root" (i.e. uid:gid == 0:0)?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple