Bug fix for FTP and Web server


Forum: DSL Ideas and Suggestions
Topic: Bug fix for FTP and Web server
started by: bdkives

Posted by bdkives on Jan. 08 2005,06:33
There seems to be a bug in the mount command for the ntfs file system which prevents you from using the FTP server to get files from the hard drive. Actually it prevents everything from serving from a Windows 2000 partition on the hard drive. I finally found the fix.

You need to edit the /usr/sbin/rebuildfstab file.

Change the line
 group="500"
to
 group="50"

If you look at  /etc/groups, you will find that 50 is "staff", and 500 doesn't exist.

Also change the line
   ntfs) options="${options},ro" ;;
to
   ntfs) options="${options},ro,umask=0222" ;;

I found the correct umask in the /etc/automount.sh file. The umask is an inverted chmod. A umask=0222 is the same as a chmod 555, read and execute permissions for everybody. It's the only way to get the web and FTP server to access the ntfs file system.

If you only fix the guid=500 problem and not the umask problem and then log in as dsl, BetaFTPd and Pure-FTPd will let cd around the directories but not get anything. Setting the umask fixes everything.

Pure-FTPd had better error messages which helped me track down the problems.

Keep up the great work,
-Bruce Kives

Posted by Guest on Feb. 02 2005,21:09
You can also mount your ntfs partition using :
mount -o uid=0,gid=0,umask=0222 -t ntfs /dev/hdx /mnt/hdx

That took a good few hours of cursing to discover :laugh:

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.