{
    "content": [
        {
            "type": "text",
            "text": "# chmod (perldoc)\n\n## TLDR\n\n> Change the access permissions of a file or directory.\n\n- Give the [u]ser who owns a file the right to e[x]ecute it:\n  `chmod u+x {{path/to/file}}`\n- Give the [u]ser rights to [r]ead and [w]rite to a file/directory:\n  `chmod u+rw {{path/to/file_or_directory}}`\n- Remove e[x]ecutable rights from the [g]roup:\n  `chmod g-x {{path/to/file}}`\n- Give [a]ll users rights to [r]ead and e[x]ecute:\n  `chmod a+rx {{path/to/file}}`\n- Give [o]thers (not in the file owner's group) the same rights as the [g]roup:\n  `chmod o=g {{path/to/file}}`\n- Remove all rights from [o]thers:\n  `chmod o= {{path/to/file}}`\n- Change permissions recursively giving [g]roup and [o]thers the ability to [w]rite:\n  `chmod {{-R|--recursive}} g+w,o+w {{path/to/directory}}`\n- Recursively give [a]ll users [r]ead permissions to files. Also give e[X]ecute permissions to files that have at least one execution permission and to all sub-directories:\n  `chmod {{-R|--recursive}} a+rX {{path/to/directory}}`\n\n*Source: tldr-pages*\n\n---\n\n## Full Content\n\n"
        }
    ],
    "structuredContent": {
        "command": "chmod",
        "section": "-f",
        "mode": "perldoc",
        "summary": null,
        "synopsis": null,
        "tldr_summary": "Change the access permissions of a file or directory.",
        "tldr_examples": [
            {
                "description": "Give the [u]ser who owns a file the right to e[x]ecute it",
                "command": "chmod u+x {{path/to/file}}"
            },
            {
                "description": "Give the [u]ser rights to [r]ead and [w]rite to a file/directory",
                "command": "chmod u+rw {{path/to/file_or_directory}}"
            },
            {
                "description": "Remove e[x]ecutable rights from the [g]roup",
                "command": "chmod g-x {{path/to/file}}"
            },
            {
                "description": "Give [a]ll users rights to [r]ead and e[x]ecute",
                "command": "chmod a+rx {{path/to/file}}"
            },
            {
                "description": "Give [o]thers (not in the file owner's group) the same rights as the [g]roup",
                "command": "chmod o=g {{path/to/file}}"
            },
            {
                "description": "Remove all rights from [o]thers",
                "command": "chmod o= {{path/to/file}}"
            },
            {
                "description": "Change permissions recursively giving [g]roup and [o]thers the ability to [w]rite",
                "command": "chmod {{-R|--recursive}} g+w,o+w {{path/to/directory}}"
            },
            {
                "description": "Recursively give [a]ll users [r]ead permissions to files. Also give e[X]ecute permissions to files that have at least one execution permission and to all sub-directories",
                "command": "chmod {{-R|--recursive}} a+rX {{path/to/directory}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [],
        "sections": []
    }
}