Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

/net directory problem

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> /net directory problem Page: [1]
Login
Message << Older Topic   Newer Topic >>
/net directory problem - Mar. 24, '06, 4:29:11 AM   
gilles

 

Posts: 3
Joined: Jun. 5, '03,
Status: offline
hello

we face strange problems when accessing nfs directories from the /net directory
(note that the following problems occur on ALL of our machines with SFU 3.5 installed):

1) every makefile failes during the linking process with the error: input/ouput error.
2) every makefile failes when using the ar command with the error: input/ouput error.

to narrow things down we made some tests. suppose the following makefile cases:

ar -r example.lib *.o -> works correctly
ar -r ./example.lib *.o -> input/output error
cd someDir; cd ..; ar -r example.lib *.o -> input/output error

all of the above commands succeed if we execute them directly in an interix shell
(tcsh, csh, ...). to test if only makefiles are affected we wrote a simple program:

int main(void)
{
int fd;
char *Buf;
char FileName[200];


/* Buf = malloc(100); */

strcpy(FileName, "/net/orakel/LV01/user/cdal/temp/test_write_file");

fd = open(FileName, O_RDWR | O_CREAT, 0666);

/* note: Buf not allocated! */
if (write(fd, Buf, 12) < 0)
{
printf("error: %s\n", strerror(errno));
printf("write error: %d, %s\n", errno, strerror(errno));
}
}

perform the following steps:

1) compile program: gcc test_write.c -o testwrite
2) setenv PATH ${PATH}:.
3) ./testwrite -> no output, ok

4) testwrite -> output:
error: Input/output error
write error: 5, Input/output error

5) uncomment the line /* Buf = malloc(100); */
6) recompile program: gcc test_write.c -o testwrite
7) ./testwrite -> no output, ok
8) testwrite -> now: no output, ok

has the problem something to do with path resolution?

our NFS file server is a linux machines. user/group mapping
is ok:

> ls -l test_write_file
-rw-r--r-- 1 cdal xaf 12 Mar 24 10:16 test_write_file

note: if we are using "Map Network Drive..." from the explorer menu entry
"Tools" and assign a drive letter the above problems do not happen.

any hints where the problem might be?

thanks in advance!
Post #: 1
RE: /net directory problem - Mar. 24, '06, 12:26:58 PM   
Rodney

 

Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
Which version of the subsystem do you have installed?
The command "fileinfo" will should what hotfix level it's at.

Also have you applied any of the NFS hotfixes at all?
Have you installed and configured User Name Mapping (UNM) for NFS as well?

(in reply to gilles)
Post #: 2
RE: /net directory problem - Mar. 24, '06, 1:49:17 PM   
gilles

 

Posts: 3
Joined: Jun. 5, '03,
Status: offline
hello

installed hotfixes:

- interix: 886655, 887531, 902074, 904358
- User Name Mapping (including most users of Interix), Windows 2000/XP: 883520-Win2000/XP
- Client for NFS: 894186


> fileinfo
/dev/fs/C/WINDOWS/system32/PSXSS.EXE 8.0.1969.36
/dev/fs/C/WINDOWS/system32/PSXDLL.DLL 8.0.1969.36
/dev/fs/C/WINDOWS/system32/POSIX.EXE 8.0.1969.36
/dev/fs/C/WINDOWS/system32/PSXRUN.EXE 8.0.1969.36
/dev/fs/C/WINDOWS/system32/drivers/PSXDRV.SYS 8.0.1969.1


user name mapping for NFS is installed and configured:
Start->Programs->Windows Services for UNIX->Services for UNIX Administration->User Name Mapping

the mapping works as expected. if i do a "ls -l", i see the correct user and group on files and
directories.


as already said, if the NFS drive is mounted via "Map Network Drive..." under the explorer
everything works perfect.


thanks for you help so far!

(in reply to Rodney)
Post #: 3
RE: /net directory problem - Mar. 24, '06, 3:47:54 PM   
Rodney

 

Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
Following along using your test program:
The write() is accessing a chunk of memory that has either a
base of some random value or 0 (zero) when unallocated.
The memory base of Buf may not be in the user space of the program.
So when an attempt is made to access this memory chunk an I/O error
happens because the accessor has not the permission.
When Buf is allocated it is within the user space of the program and
thus access is allowed, no I/O error.

When drivers are doing an memory access then they impersonate the calling user.
It may be (and it's sounding likely) that the "driver letter driver" is doing
the memory access as SYSTEM (the power to do everything) before it hands it to
the NFS driver. The NFS driver is doing the access under the impersonation and
cannot access the 0/random memory as the user, but when the drive letter driver
calls it is, for that time, SYSTEM and thus can make the access.
Just a theory on my part.

So even if this theory holds correct, how does this relate to make or,
as it appears you are suggesting, ar?

To elimate make (or reduce the likelyhood it is make), have you
tried running the build with gmake instead?

Have you tried, as a workaround, executing the ar as a subshell from
the makefile?

(in reply to gilles)
Post #: 4
RE: /net directory problem - Mar. 27, '06, 3:00:00 AM   
gilles

 

Posts: 3
Joined: Jun. 5, '03,
Status: offline
hello

we also wonder about the relation of ar (ln) and gmake. btw: it doesn't matter
if we use make or gmake, we always encounter the same behaviour. what's even
stranger is the fact that the error does not appear when doing the same
steps from the shell AND the error does not occur when we do no directory
changes in the makefile! what do you mean by subshell? i tried all available
shells out of csh, i started the tcsh several times, replayed the procedures,
started the korn shell several times repeated again everything. but same behaviour
as ever.

strange, isn't it?

(in reply to Rodney)
Post #: 5
Page:   [1]
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> /net directory problem Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047