Solaris Common Messages and Troubleshooting Guide

/dev/fd/int: /dev/fd/int: cannot open

Cause

setuid and setgid shell scripts refuse to run. They return an error message similar to /dev/fd/3: /dev/fd/3: cannot open. (The number following /dev/fd/ is not necessarily 3.) The first line of the script properly starts a shell, and the file system containing the script is not mounted with the nosuid option.

Running truss on the shell script reveals that a call to open(2) is failing with error number 6 (ENXIO):


open("/dev/fd/3", O_RDONLY)                     Err#6 ENXIO

Action

setuid and setgid shell scripts use the file descriptors in /dev/fd. The contents of /dev/fd are a file descriptor file system (FDFS) and have no connection with floppy disks!

Ensure that the fdfs is mounted as /dev/fd. Before the machine is next rebooted, the following line should appear in /etc/vfstab, exactly like this (with no initial comment symbol):


fd		-		/dev/fd		fd	-	no	-

It might be possible to remount /dev/fd without rebooting by running the following as root:


# mount fd /dev/fd
Otherwise, to make setuid/setgid shell scripts available, the machine must be rebooted after editing /etc/vfstab as detailed above.

Some administrators, unaware of what /dev/fd is for, comment out the entry in /etc/vfstab that mounts the FDFS (file descriptor file system). This can go unnoticed until an attempt is made to run a setuid or setgid shell script.