This is a cache of https://vccplus.brianholman.com/manuals/working-with-os9/files/. It is a snapshot of the page as it appeared on 2026-11-21T00:01:55.906+0000.
A file has a name and an owner · Working with OS-9 — A Comprehensive Manual · VCC Plus
← Manual LibraryVCC Plus 3.7.1 · Reading on the web

Try the exercises in VCC Plus. Example links download files here; open them in the app to work beside the emulator.

The complete book · PDF editionBook 11: Working with OS-9 — A Comprehensive Manual

51 pages · VCC Plus 3.7.1 · Keep a copy to read or print.

Download PDF
Contents

Chapter 4 of 14

A file has a name and an owner

Before changing a procedure, you want a known good copy. A name helps you find it. To decide whether you can read, change or run it, OS-9 consults information stored in its file descriptor.

Compare a working file and a copy

Begin in /H1/station with the original report. Use an unused destination name.

copy report backup
cmp report backup
attr backup
dir -e /h1/station

Cmp compared 00000017 bytes and found 00000000 differences. Those counts are hexadecimal. The two files each hold 23 bytes. A comparison of contents answers a narrower question than a directory listing. It says the bytes match. The detailed listing shows the files have distinct descriptor sectors and gives their owner, modification timestamp, attributes and size.

The attributes of backup read ------wr. Read the positions from right to left: owner read, write and execute, followed by public read, write and execute, the share-mode bit, and the directory flag. Here only the rightmost two bits are set. When OS-9 checks a file, it considers the user ID of the caller as well as the access requested. A permission to write an existing file and a permission to create entries in a directory answer different questions.

Give the backup a durable name

rename backup report.old
shell report.old
echo new >report
list report

Rename changes the directory entry. The saved copy still runs and prints beacon online and your working directory. The attempted create over report returns error 218. The original procedure still lists both commands. On this shell a fresh filename is the simple way to keep a second run’s output.

Shell+ shows the renamed procedure running, refuses to create over report, and lists both original lines afterward.

Diagnose a permission failure

Use a separate copy so you can observe a real access error and repair it without changing either copy of the lesson procedure. The following assumes guard is unused.

copy report guard
attr guard -r
list guard
attr guard r
list guard

Removing the owner read bit produced ------w-. The first List returned ERROR #214. Restoring the bit produced ------wr. The last List recovered the original two lines. The name and bytes survived throughout. This is a different problem from error 216, where the requested pathname could not be found.

For a program module, owner execute is a separate attribute. Chapter 13 sets that bit on the station’s own assembled program. The right to execute a file and the operating system’s ability to recognize its module header are both relevant there.

Inspect a supported image without booting it

For a supported raw OS-9 image, Edit… beside its mounted floppy or hard drive provides a native directory browser. For a separate unmounted image, use Media → Floppy Disks… → Open Disk Image…. If the image contains more than one filesystem, select its OS-9 volume before browsing the folders. Select a file or folder and choose Info. The same File Information sheet shows its details, owner/public read-write-execute bits, Single access (non-shareable) and ownership. File versus Directory is structural information and stays read-only. Single access permits only one opener at a time.

OS-9 stores one 16-bit owner ID. The editor's Group ID and User ID fields are its high and low bytes, each from 0 through 255; the table displays group.user. Group 12 and user 34 therefore mean decimal owner ID 3106. This is not a Unix owner/group/other permission layout: access has owner and public triplets.

Save Changes in File Information changes the editor's private working image. Undo/Redo can reverse it before the image itself is saved or applied. For a mounted floppy or hard disk, the editor pauses and locks the CoCo and requires an explicit restart before applying, so OS-9 cannot reuse an old descriptor or allocation cache. Image write protection still applies even when the host editor can repair an entry with no guest access permissions.

For regular files within that supported image, Move To… in the editor's toolbar or context menu chooses another OS-9 folder. Dragging selected files onto a folder uses the same operation. Permissions and ownership remain attached to the file; Undo restores the previous locations. A duplicate destination name is refused without overwriting, and the move remains private until the image is saved or applied. See Move files between OS-9 folders.

The editor identifies filesystems within supported raw hard-drive images, including the OS-9 region and numbered HDB-DOS Disk BASIC volumes when both share one image. Space totals describe the selected filesystem; saving an edited copy keeps the complete image and preserves its other regions. It does not format, repair or convert a disk. Follow the Disk Image Editor procedure and limits. The supplied station exercises continue to use guest commands, so you can observe OS-9's own file handling and permissions.

Original VCC Plus manuals © 2026 Brian K. Holman. Third-party references retain their authors’ copyrights and licenses. Artwork notices. Edition 3.7.1; source and export identity. Printable edition: PDF source and export identity.

A closer look

Open original