Linux Add Trustee


This tool adds a trustee to an NSS file. The trustee is given file scan rights by default. It uses the Virtual File Services (Originally called Virtual File Services for NetWare) which were ported over to Linux. The SDK for this API set can be downloaded from The objective of the tool is to add a trustee to a file using XML as specified in the VFS for NetWare specification. It is intended to be used as a sample script for developers that may want to use the VFS API set to view and manage storage.

How to Use the file: is a Perl script. So Perl must be installed and running on the Linux server that this file is being loaded on. NSS must be installed to get the VFS support.

From a terminal prompt type: perl user.context.tree /path/fileName.ext <enter>

Where user is the trustee to add. The name needs to include the full context including the tree.
Where fileName is the name of the file, it must include the complete path including the leading slash.

Example: perl user1.novell.COMPANY_TREE /home/usr/user1/file.txt <enter>

A sample output would be the following:

grep57:/a # perl user1.sms.GREPTREE /media/nss/NSS1/file.txt
file is now open
NSS management file Name: </_admin/Manage_NSS/files.cmd
Trustee: user1.sms.GREPTREE
FileName: /media/nss/NSS1/file.txt
Request Sent: <virtualIO><datastream name="command"/></virtualIO><fileRequest><trustees><addTrustee><name>user1.sms.GREPTREE</name><rights>fileScan</rights><fileName>/media/nss/NSS1/file.txt</fileName></addTrustee></trustees></fileRequest>
<result value="0"><description>success</description></result>
<result value="0"><description>zOK</description></result>

The specifications explain the XML tags.


How To-Best Practice
Comment List
Related Discussions