Apache, ncpfs weirdness

Paul_Maia at Dell.com Paul_Maia at Dell.com
Mon Jul 19 16:18:40 UTC 2004


Hi all,
I hope this is the right place... It is Fedora Core 1. But if not, 
please direct me. I was unable to locate a ncpfs list, but I didn't 
search for long.

Sorry, but this is a little long winded. I have googled for a mention 
of an issue such as this, but found nothing. Without knowing more 
about the issue, I was unable to pare the search parameters down 
enough to get a manageable list of hits.

I am having this weird issue with Fedora Core 1 and ncpfs. The system 
has all patches/yum updates applied. 
  System is a Dell 2550, dual 933 procs and 1gb ram
  kernel is at 2.4.22-1.2197.nptlsmp
  apache is at 2.0.49
  ncpfs is at 2.2.3
The system is a little complex, so here goes an explanation:
---NETWARE/ncpfs
I have a Netware 5.? volume (SYS2) mounted onto /netware/nw1 over IP. 
The way I mount it is:
  modprobe ncpfs
  mount -t ncpfs -o ipserver=NWServer,user=user,tcp,nopasswd,filemode=0777,dirmode=0777 NWServer:/sys2 /netware/nw1
The mount works and I can see all of the files and file contents.
---APACHE
In Apache, I have 'Indexes' active and an 'alias' mapping nw1 to 
/netware/nw1. I used the alias (rather than a link) so that my backup 
would not backup the contents of the Netware server. When I type 
http://apache_server/nw1, in Mozilla (I also tried IE on a Windoz box), 
I get the contents of the Netware server listed on the screen, all in 
lowercase. 

---Here's where the weirdness starts:
Say there are 3 batch files on the Netware share: x1.bat 3.2k, x2.bat 
242 bytes, x3.bat 301 bytes. The files do not have any weird EOF characters. 
HexList only shows CR, LF and BELL in the files. The files are different, 
but are similar.
  If I click on x1.bat, Mozilla will show an empty file.
  If I click on x2.bat, Mozilla will show the file contents as expected.
  If I click on x3.bat, Mozilla will show an empty file.
If I go look at the directory contents, in bash, all files look as expected 
and can be viewed or copied without issue. If I go look at the directory 
contents, in a Windoz DOS box (with a mapped drive), all files look and view 
as expected.
---Another oddity (as a side note)
If I edit x1.bat, and save it, EDIT will save the file in uppercase. Actually, 
all of the files are in uppercase, when displayed from the DOS session. 
Refresh the Mozilla view of the directories and the file is now in uppercase 
and is moved to the top of the directory listing (where the uppercase files be). 
An ls of the directory contents on the share, show the single uppercase file, 
but the sorting of the file listing shows it with it's lowercase counterparts. 
Also, the icon displayed next to the file on x2.bat & x3.bat show the file as 
text, and on x1.bat it shows unknown (question mark).
--- Other debugging
* I created another Alias (in Apache, with a restart) as paul to /paul on the 
local file-system. I did a straight cp of the Netware directory to /paul. All 
files copied correctly. When I access http://apache_server/paul, all of the 
files are shown in the directory listing as before. All file contents can now 
be viewed as expected.
* If I click on an EXE file (or any other file type that should be downloaded, 
instead of showing in the browser), it will want to download/save the file. 
After it is saved, it is a zero length file. No errors are logged in /var/log 
anywhere.
* I have some perl and python cgi-scripts that also run on the site as SSI's or 
as cron jobs. All of these programs can access the contents of the files in 
their entirety, no issues. I have a simple CGI file viewer and it shows file 
contents in the browser just fine. All of these are running from the same share 
as the Apache server, except that the Apache server is running it through an 
'Alias'.
* The issue seems to be file-size related. Any file below 256 bytes in length, 
seems to display/download as expected. So, to prove this, I created 4 test files: 
test1.bat-257 bytes, test2.bat-256 bytes, test3.bat-255 bytes, test4.bat-254 bytes. 
When clicked, the 254 byte and 255 byte files were shown as expected, the 256 byte 
and 257 byte files were shown as empty files. All 4 of the files' icons were shown 
with the unknown/question mark icon.

I saw that there is a 2.4.4 version of ncpfs available, but I didn't see anything 
in the change log to address this, but I am not familiar with the internals of 
ncpfs to know. I was leery about installing the 2.4.4 version, afraid that I might 
not be able to maintain my ability to continue updating with yum, if a later ncpfs 
comes out.

Any help or direction would be appreciated. The server is not accessible from the 
net, or I would send a link to it to show the issue.

Thanks,

Paul Maia






More information about the fedora-list mailing list