[FEATURE] Implement original-object mode ownership and access operations #29

Closed
opened 2026-10-02 06:32:07 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Build tools need chmod/fchmod/fchmodat, chown/fchown/fchownat/lchown and access/faccessat over their original delegated files. Existing Open, namespace mutations and truncate use fresh mode/access-ACL evidence; ext creation already inherits complete default ACLs and persistent mode updates preserve named ACL entries. The compatibility metadata-operation consumers and conditional original-object mutation path remain missing.

Proposed behavior and scope

Implement exact versioned descriptor and pathname metadata intents with original client identity, complete raw paths, follow/no-follow policy and full-width owner/group fields with explicit unchanged values. A pathname operation uses the existing scoped resolver without allocating or publishing an fd. A descriptor operation retains the existing original description, including read-only content access, independently of fresh metadata authorization.

Native mutation requires the same live scope, original object and fresh permission revision in one provider turn. A writable native scope and mount remain mandatory. The compatibility caller must own the file; UID zero adds no bypass. Restricted ownership policy allows only preserving the owner and selecting an effective/supplementary group. Mode changes constrain set-group-ID by actual group membership; ownership changes apply the documented regular-file set-ID clearing policy. Type, endpoint and content access never come from mode bits.

Access uses real IDs by default and effective IDs only when explicitly requested, including every prefix search. Requested permissions are checked individually; existence queries still require actual original native existence. Success is an observation and never a reusable admission token. Normal I/O retains its existing open-description access without new per-read/write DAC checks.

Preserve process umask, inherited default/access ACL policy, named entries and mode/mask correspondence. Ext changes use the original complete transaction and ACL owners; RAM and selected FAT metadata retain their documented ACL support. Unknown or unsupported evidence is explicit and never treated as ACL absence. Coordinate LibIPC, Lib-posixabi, Posixd, Vfsd, RAM/ext/FAT, Integration and maintained manuals.

Authority, security and reliability

Authenticate the original receiver and staged client before selecting descriptive inputs. Retain original scope, mount/provider, candidate, revision, native caller and cleanup owners. No path reopening after permission checks, new native route, implicit credential transition, UID-zero privilege, broad metadata grant or field-based capability synthesis is allowed.

Consume the original condition at the provider; revision change-and-restore cannot revive it. Correlate the entire intended update before success or reuse. Definite refusal, stale evidence and uncertain completion remain distinct. Capacity admission precedes effects; cancellation, signal delivery, rejected completion and final alias retirement keep original ownership. Metadata changes do not revoke independently admitted ordinary content access or move cursors.

Acceptance criteria

Checklist
  • Implement conditional original-object mode/owner updates with exact native/private framing, actual provider mutation, complete ACL coherence, original transaction ordering and explicit stale/unsupported/refused/uncertain outcomes.
  • Implement descriptor and pathname chmod/chown families, owner/group/special-bit policy and original cleanup without allocating an fd for pathname mutations.
  • Implement real/effective-ID access queries with prefix search, individual permission checks, final-link policy, actual existence and native scope/mount ceilings; retain existing umask/default-ACL behavior.
  • Author independent wire, provider, real-service and native VM controls for identity replacement, aliases, stale/changed evidence, ownership/group boundaries, ACLs, storage failure, interruption and cleanup.
  • Complete source authority/code-size review, inline/component/manual documentation, coherent signed immutable publication and linked issue/review/master reconciliation. Test execution is waived rather than represented as a pass.

Alternatives and tradeoffs

Share the existing resolver, complete streaming ACL fold, provider permission revisions and transaction machinery. Pathname reopening would separate the permission verdict from its selected object. Native capabilities still bound all metadata policy; implicit superuser or newly discovered provider authority cannot replace that boundary. The current optional access/default ACL profile remains distinct from the base POSIX permission API.

Behavioral references are the Open Group access contract, ownership contract, mode contract, and maintained ACL specification. Implementation and fixtures are original; no external code is copied.

Tracking and rollout

Related: credential and ACL enforcement, filesystem semantics, retained truncate/sync, compatibility ABI, phase completion, mediator review, ABI review and Integration review.

Finish provider/native ownership before compatibility consumers, then the complete controls, audit, documentation and signed rollout. Do not substitute an intermediate codec for complete acceptance. Tests, builds, lint checks, generated documentation, VM/profiler execution and CI observation remain deferred. Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Original mode ownership and access completion — 2 October 2026

F_OK, unavailable metadata and read-only mount denial remain distinct.

Full libc/system acceptance, both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Conditional native permission updates — 2 October 2026

No new native grant or endpoint is added.

Compatibility chmod/chown/access consumers, complete VM workloads and full feature acceptance remain open. Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Related records and contracts
Repository Links
lib-ipc conditional-permissions.md
lib-posixabi permission-operations.md
posixd issue 29, permission-operations.md
## Problem and motivation Build tools need chmod/fchmod/fchmodat, chown/fchown/fchownat/lchown and access/faccessat over their original delegated files. Existing Open, namespace mutations and truncate use fresh mode/access-ACL evidence; ext creation already inherits complete default ACLs and persistent mode updates preserve named ACL entries. The compatibility metadata-operation consumers and conditional original-object mutation path remain missing. ## Proposed behavior and scope Implement exact versioned descriptor and pathname metadata intents with original client identity, complete raw paths, follow/no-follow policy and full-width owner/group fields with explicit unchanged values. A pathname operation uses the existing scoped resolver without allocating or publishing an fd. A descriptor operation retains the existing original description, including read-only content access, independently of fresh metadata authorization. Native mutation requires the same live scope, original object and fresh permission revision in one provider turn. A writable native scope and mount remain mandatory. The compatibility caller must own the file; UID zero adds no bypass. Restricted ownership policy allows only preserving the owner and selecting an effective/supplementary group. Mode changes constrain set-group-ID by actual group membership; ownership changes apply the documented regular-file set-ID clearing policy. Type, endpoint and content access never come from mode bits. Access uses real IDs by default and effective IDs only when explicitly requested, including every prefix search. Requested permissions are checked individually; existence queries still require actual original native existence. Success is an observation and never a reusable admission token. Normal I/O retains its existing open-description access without new per-read/write DAC checks. Preserve process umask, inherited default/access ACL policy, named entries and mode/mask correspondence. Ext changes use the original complete transaction and ACL owners; RAM and selected FAT metadata retain their documented ACL support. Unknown or unsupported evidence is explicit and never treated as ACL absence. Coordinate LibIPC, Lib-posixabi, Posixd, Vfsd, RAM/ext/FAT, Integration and maintained manuals. ## Authority, security and reliability Authenticate the original receiver and staged client before selecting descriptive inputs. Retain original scope, mount/provider, candidate, revision, native caller and cleanup owners. No path reopening after permission checks, new native route, implicit credential transition, UID-zero privilege, broad metadata grant or field-based capability synthesis is allowed. Consume the original condition at the provider; revision change-and-restore cannot revive it. Correlate the entire intended update before success or reuse. Definite refusal, stale evidence and uncertain completion remain distinct. Capacity admission precedes effects; cancellation, signal delivery, rejected completion and final alias retirement keep original ownership. Metadata changes do not revoke independently admitted ordinary content access or move cursors. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Implement conditional original-object mode/owner updates with exact native/private framing, actual provider mutation, complete ACL coherence, original transaction ordering and explicit stale/unsupported/refused/uncertain outcomes. - [x] Implement descriptor and pathname chmod/chown families, owner/group/special-bit policy and original cleanup without allocating an fd for pathname mutations. - [x] Implement real/effective-ID access queries with prefix search, individual permission checks, final-link policy, actual existence and native scope/mount ceilings; retain existing umask/default-ACL behavior. - [x] Author independent wire, provider, real-service and native VM controls for identity replacement, aliases, stale/changed evidence, ownership/group boundaries, ACLs, storage failure, interruption and cleanup. - [x] Complete source authority/code-size review, inline/component/manual documentation, coherent signed immutable publication and linked issue/review/master reconciliation. Test execution is waived rather than represented as a pass. </details> ## Alternatives and tradeoffs Share the existing resolver, complete streaming ACL fold, provider permission revisions and transaction machinery. Pathname reopening would separate the permission verdict from its selected object. Native capabilities still bound all metadata policy; implicit superuser or newly discovered provider authority cannot replace that boundary. The current optional access/default ACL profile remains distinct from the base POSIX permission API. Behavioral references are the [Open Group access contract](https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html), [ownership contract](https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/chown.html), [mode contract](https://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html), and [maintained ACL specification](https://man7.org/linux/man-pages/man5/acl.5.html). Implementation and fixtures are original; no external code is copied. ## Tracking and rollout Related: [credential and ACL enforcement](https://git.erikinkinen.fi/erix/posixd/issues/10), [filesystem semantics](https://git.erikinkinen.fi/erix/posixd/issues/2), [retained truncate/sync](https://git.erikinkinen.fi/erix/posixd/issues/28), [compatibility ABI](https://git.erikinkinen.fi/erix/lib-posixabi/issues/1), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65), [mediator review](https://git.erikinkinen.fi/erix/posixd/pulls/5), [ABI review](https://git.erikinkinen.fi/erix/lib-posixabi/pulls/3) and [Integration review](https://git.erikinkinen.fi/erix/integration/pulls/12). Finish provider/native ownership before compatibility consumers, then the complete controls, audit, documentation and signed rollout. Do not substitute an intermediate codec for complete acceptance. Tests, builds, lint checks, generated documentation, VM/profiler execution and CI observation remain deferred. Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. ### Original mode ownership and access completion — 2 October 2026 F_OK, unavailable metadata and read-only mount denial remain distinct. Full libc/system acceptance, both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. ### Conditional native permission updates — 2 October 2026 No new native grant or endpoint is added. Compatibility chmod/chown/access consumers, complete VM workloads and full feature acceptance remain open. Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | lib-ipc | [conditional-permissions.md](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/conditional-permissions.md) | | lib-posixabi | [permission-operations.md](https://git.erikinkinen.fi/erix/lib-posixabi/src/branch/feature/posix-compat/docs/permission-operations.md) | | posixd | [issue 29](https://git.erikinkinen.fi/erix/posixd/issues/29), [permission-operations.md](https://git.erikinkinen.fi/erix/posixd/src/branch/feature/posix-compat/docs/permission-operations.md) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:07 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/posixd#29
No description provided.