sftp rename and transfers fail on NSS volumes

  • 7002445
  • 26-Jan-2009
  • 30-Jun-2015

Environment


Novell SUSE Linux Enterprise Server 10 Support Pack 2
Novell Open Enterprise Server 2 (OES 2)
Novell Open Enterprise Server 11 (OES 11) Linux Support Pack 2
Novell Open Enterprise Server 11 (OES 11) Linux Support Pack 1
SUSE Linux Enterprise Server 11 Service Pack 3 (SLES 11 SP3)
SUSE Linux Enterprise Server 11 Service Pack 2 (SLES 11 SP2)

Situation

Users connecting via SFTP to NSS volumes get "bad message" or "error code 5" when creating or renaming files.

Resolution

By default, NSS does not have hard links enabled by default. Programs attempting to rename or transfer files with transmit/resume features enabled will fail with out hard links.

This can be fixed by enabling hard links on NSS
  1. Open nsscon
  2. Upgrade the media format to the latest. Replace "volname" with the name of the volume:
    nss /ZLSSUpgradeCurrentVolumeMediaFormat=volname
  3. Enable hard links
    nss /Hardlinks=volname
After step 3, you may see an error message:
Hardlinks may not be created on volume "volname" until it is upgraded using the "ZLSSUpgradeCurrentVolumeMediaFormat" command...

The message means that hardlink support will not be available until the media update has completed. The process of updating the media format can take several hours; during the update, file transfers and renaming will fail until the process has completed. In some cases, step 3 may need to be run a second time.

In order for users to see the change, all "ssh" and "sftp" processes need to be restarted. The following commands will stop all sftp sessions and restart the ssh daemon.
  • killall sftp-server
  • rcsshd restart


Additional Information

This is not a defect, but the default behavior of NSS on OES 2 SP1.