This is the mail archive of the cygwin-apps@cygwin.com 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: Latest rev of NFS server


On Sun, 16 Feb 2003, Robb, Sam wrote:

> "Oh, Bother," said Pooh.  I'll try to resolve this - it's working
> on my system, so I may just have transposed some numbers :-/

> 	> If you already have an existing exports file, you will need
> 	> to explicitly change owner/permissions on the file yourself:
> 	>
> 	>   chmod 664 /etc/exports
> 	>   chown 18:544 /etc/exports
> 	
> 	Unfortunately this doesn't work. The daemons (nfsd,mountd) complain, that
> 	a user with uid different from 18 are allowed to write to /etc/exports.
> 	
> 	So the permissions of /etc/exports should be 644 to start the new version
> 	of the daemon.

Strange. Looking at the code in faccess.c it seems, that is the way 
the code is intended to work i.e. complain when the file is 
group writable:

  if (efs_stat(pchFilename,&statData) == -1) {
      if (errno == ENOENT)
        status = FACCESSNOTFOUND;
      else status = FACCESSIOERR;
  } else {
       if ((statData.st_mode & S_IWOTH) ||
           (statData.st_mode & S_IWGRP) ||
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           ((statData.st_uid != uidOwner) && (statData.st_mode & 
S_IWUSR))) {
             status = FACCESSWRITABLE;
       } else if ((statData.st_uid != uidOwner) ||
                (statData.st_gid != gidOwner)) {
             status = FACCESSBADOWNER;
       } else if ((statData.st_mode & S_IROTH)) {
             status = FACCESSWARN;
       }
  }
  return status;


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