> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Change File Owner

> Change file or directory ownership.



## OpenAPI

````yaml /sprites/api/openapi.json post /v1/sprites/{name}/fs/chown
openapi: 3.1.0
info:
  title: Sprites API
  version: 0.1.12
  x-sprite-env-version: v0.0.1-rc48
servers:
  - url: https://api.sprites.dev
security: []
paths:
  /v1/sprites/{name}/fs/chown:
    post:
      tags:
        - Filesystem
      summary: Change File Owner
      description: Change file or directory ownership.
      operationId: sprite_env_change__file__owner
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChownRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChownResponse'
          description: Success
        '400':
          description: Bad Request - Invalid request body
        '404':
          description: Not Found - Resource not found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    ChownRequest:
      properties:
        asRoot:
          type: boolean
        gid:
          type: object
        path:
          type: string
        recursive:
          type: boolean
        uid:
          type: object
        workingDir:
          type: string
      required:
        - path
        - workingDir
        - uid
        - gid
        - recursive
        - asRoot
      type: object
    ChownResponse:
      properties:
        affected:
          items:
            $ref: '#/components/schemas/ChownResult'
          type: array
        count:
          type: integer
      required:
        - affected
        - count
      type: object
    ChownResult:
      properties:
        gid:
          type: integer
        path:
          type: string
        uid:
          type: integer
      required:
        - path
        - uid
        - gid
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````