When you work with files in a bs2fs file system, you must bear in mind a few special features (e.g. compared to working with local POSIX files), and these are summarized again below:
New files created in a bs2fs file system
New files or library elements which are created in a bs2fs file system are assigned BACL attributes. The file attributes ACCESS and USER-ACCESS are consequently irrelevant with regard to protection.DMS wildcard in the case of the mount command for the bs2fs file system
New DMS files (always of the type SAM) can be created only if their names comply with the pattern specified in the mount command and the syntax rules of BS2000. In particular, it is not possible to create files whose names begin with a period (.).PLAM library: BS2000 file lock of the type read
When a PLAM library in the bs2fs file system is accessed (e.g. with ls), it is assigned a read lock ("Lock Type INPUT") in BS2000. You can then not rename, delete or modify the PLAM library's file attributes. Read locks are automatically released again by the bs2fs daemon if no further bs2fs accesses to the PLAM library have taken place within approx. 20 seconds.
The bs2fsd daemon immediately releases locks of the type write ("Lock Type INOUT") for a PLAM library as soon as there is no longer any element open for the job submitting user in the library.Write permission is required to delete files in a bs2fs file system
Deletion of files in a bs2fs file system is always rejected if no write permission exists. In POSIX files can be deleted even without write permission (cf. rm with query or with the -f option or mv with query).Access rights for the privileged user
As is the case with the access rights in BS2000, only the TSOS ID has the same rights as the owner of a file or of a PLAM library by default when accessing files in the bs2fs file system. The SYSROOT ID, which is also assigned the privileged uid=0 in POSIX, is treated like any other nonprivileged ID when bs2fs file accesses occur.
In the POSIX/UNIX world privileged IDs (uid=0) are allowed to perform accesses which go beyond the file owner's access options, e.g. reading a file, although the protection bits do not grant the file owner read access.
However, in bs2fs file systems TSOS also only has the permissions which the owner of an object has in BS2000. When SECOS is used (e.g. GUARDS), the owner can also restrict TSOS rights.Updating files in text mode
When existing records in SAM or ISAM files which are mounted with ftyp=text are updated, the record length may not be modified. Shortening or lengthening a record results in an EIO error. The write() is not executed, and after close() only those parts of the BS2000 file are modified which were written successfully with write().Time stamp
The time stamps of a file or library element determined with FSTAT are mapped in the bs2fs file system to the fields of the stat data structure in POSIX as follows:BS2000
POSIX
CRE-DATE/TIME
st_ctime
ACC-DATE/TIME
st_atime
CHANG-DATE/TIME
st_mtime
The following must be borne in mind here:
While a file is open, the st_atime and st_mtime fields of the ufs shadow file are accepted as the st_atime and st_mtime of the bs2fs in the bs2fs file system; after the file has been closed, the values which FSTAT supplies in BS2000 are output again. This can result in the modification times for a file displayed with the /SHOW-FILE-ATTRIBUTES command differing from the times ascertained with ls -l in the bs2fs file system as long as the file is open.
The CRE-DATE/TIME and st_ctime fields are interpreted differently in BS2000 and POSIX/UNIX. In BS2000, CRE-DATE/TIME specifies the time when a file was created; in POSIX/UNIX, st_ctime logs the time when the management structures were last changed (e.g. because of chmod)
File sizes
As long as a file or library element has not not been opened in bs2fs after mounting (mount), the size of a file specified in the output of the ls -l command is calculated from the number of PAM pages supplied by the BS2000-FSTAT macro multiplied by 2048. Only after a file has been opened in the bs2fs file system is the display precise to the byte. This value can be incorrect if the size of the file was modified outside the bs2fs.Handling migrated files
Processing of migrated files is not supported. This has the following consequences:ls, stat(), fstat() do not display the names of migrated files.
If you attempt to open a migrated file, errno 8 (
ENOENT
, "No such file or directory") is returned.If you attempt create a new file with the name of a migrated file, e.g. with creat(), rename() or with the shell command cp, mv, errno 206 (
ENXIO
, "No such device or address") is returned.ENXIO
is unambiguous for bs2fs accesses, i.e. an attempt to create a new file with the name of a migrated file is always involved.
X bit for directories
The x bit for a directory is interpreted differently in the bs2fs file system than is customary in the UNIX world. In the bs2fs file system you require read permission to search for an entry in the table of contents of a PLAM library, not execution permission.The directory structure of a bs2fs file system is defined by the mount operation and cannot be modified as it maps the structure of PLAM libraries. Directories in a bs2fs file system can therefore not be deleted or renamed, nor is it possible to create new directories. Consequently no new PLAM libraries can be generated using bs2fs means (e.g. mkdir), either. Nor can the access rights of directories be modified.
Library elements can be created in the defined directories (types) with any names which comply with the syntax rules for PLAM libraries, except in directories which map a type which does not have a standard type as its basic type.
Library elements which are assigned to a type which does not have a standard type as its basic type can only be read.
Library elements of a type with the basic type L can only be renamed as or copied to library elements of the same type or of another type with the basic type L. Likewise, files or library elements of a type with a basic type other than L cannot be renamed as or copied to an element of a type with the basic type L.
Library elements are stored in the bs2fs file system under a name which is composed of the element name and the version identifier:
elementname+ver
In addition, a hard link elementname exists to the highest current version of the element. This has the following consequences:If a new element version with a version identifier which is higher than the existing highest version identifier is generated in the bs2fs file system, elementname automatically refers to the new highest version.
Deleting elementname (e.g. with
rm
elementname) has the following consequences:First the file containing the highest version of the element is deleted.
If other versions of the element exist, elementname subsequently refers to the new highest version. Otherwise the hard link elementname is also deleted.If a particular version of an element is deleted (e.g. with
rm
elementname+ver), the hard link elementname is also deleted if no other versions of the element exist.