4.2 NCP on Linux Security

The NetWare® and Linux security models are quite different. The basic NetWare security model assumes that users have no rights until they are granted specific rights. Those rights are inherited by the user to all child subdirectories. That way, a single trustee assignment can give a user rights to a large number of subdirectories and files. A user’s home directory will be set up so that only the user and the system administrator have rights there. A user’s files are secure. If a user wants to share his files with others, he can grant them rights through trustee assignments on the individual files or the user can create a shared subdirectory and assign trustees to it. When a user is given a trustee assignment to a file or directory, he can automatically see each parent directory along the path up to the root. However, the user can’t see the contents of those directories, just the path to where he has rights.

The POSIX/Linux security model takes a different approach. The POSIX permissions are specified for each file and subdirectory, and nothing is inherited. If a user is to have access to all the files in a subdirectory, the permissions (UID, GID, and mode bits) must be set for each file in a manner that gives the user the appropriate access. This can't be done with a simple trustee assignment to the parent subdirectory. In order for a user to use the dir or ls command, the user must have the read and execute rights in that directory and all its parent directories up to the root. Because of this, users usually have read rights by default across most of the system, and then the rights for everyone are masked for areas that need to be private. This means that the default for POSIX is open and shared rather than private. In POSIX, files are private when you make them private rather than private by default.

These differences can become problems when you try to share files between NCP users and Linux users that rely on the POSIX rights for their access (Local, SSH, and Samba users). In order for the Linux/POSIX users to access files, they need to be granted r and x rights through the group and other mode bits for subdirectories along the path up to the root of the volume. This gives them the right to see and read all files in those directories up to the root. This is unlike NCP rights on NetWare, where users see only the subdirectory path to the locations where they have been granted trustee rights. For shared volumes, NetWare users should be aware that Linux/POSIX users might have more rights to files and subdirectories than NCP users do.

Because the NetWare model is secure/private until granted specific rights, all files and subdirectories created by NCP clients have the following POSIX security permissions:

This way, by default, the only person who can access a file or subdirectory from a LINUX environment is root and the creator of the file or subdirectory. In OES SP1, an option has been added that lets a volume be configured such that the permissions (GID and mode bits) are inherited from the parent directory. This lets shared areas be more easily created and managed. This option is not enabled by default. The more secure model of the OES release is still the default. See Section 3.3.5, Setting Volume Definition Flags for more information.

Because NSS is not a POSIX file system, NSS rights don’t behave like standard POSIX rights. NSS volumes keep track of trustee assignments; all trustee assignments are synchronized between NCP and NSS. For NSS volumes, access is based on trustee rights for the user (UID) rather than the permissions (UID, GID, and mode bits). This makes things simpler in that Linux/POSIX-based users (Local, SSH, and Samba) do not have more rights than the same user would have if he were accessing files through NCP. This makes NSS easier to manage.