NSLU2-Linux
view · edit · print · history

When you save large files on your NSLU2 attached drive, sometimes an error is reported when listing directories within the WinSCP client.

This is caused by a format error within the output of the 'ls -l' command on the NSLU2.

As the 'ls' command is a part of BusyBox?, it is not possible to correct this...

The bug appears only in the following scenario:

  • the group name of the owner is more than 7 characters long
  • the files is larger than 99.999.999 bytes (i.e. the size is 9 or more characters long)

in this case the 'ls -l' command sends a string with this format:

'-rwxrw----    1 guest    everyone7835492352 Apr 23  2005 my_file.ext'

WinSCP can't decode this correctly because there is no white space between the group and the size fields...

The group names are fixed by the firmware. It is impossible to rename 'administrators' and 'everyone' with a shorter name so the solution is to create a third group.

By default 'everyone' is the Windows share group name, so you must create a new group named for instance 'windows' (or another name but 7 characters max.).

This group can be added using the web interface. It is then added in the 'group' file as "windows::2000:guest" in the directory '/share/hdd/conf'.

After this, you have to manually edit the file /share/hdd/conf/group.

You will find this :

root:x:0:root
lp:x:7:daemon,lp
mail:x:12:mail
ftp:x:50:admin
nobody:x:99:
users:x:100:
administrators::500:admin
everyone::501:guest,admin
windows::2000:guest

you must change the two last lines into this:

root:x:0:root
lp:x:7:daemon,lp
mail:x:12:mail
ftp:x:50:admin
nobody:x:99:
users:x:100:
administrators::500:admin
everyone::2000:guest,admin
windows::501:guest

and you must then reboot the NSLU2.

The new output format of 'ls -l' command would be:

'-rwxrw----    1 guest    windows 7835492352 Apr 23  2005 my_file.ext'

and WinSCP will not report any errors anymore.

view · edit · print · history · Last edited by Ernst.
Based on work by Ernst and maisondouf.
Originally by maisondouf.
Page last modified on February 08, 2009, at 03:54 PM