GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feature Add support of os.chflags() on Linux platform · Issue #75494 · python/cpython

Feature Add support of os.chflags() on Linux platform #75494

New issue
Copy link
New issue
Copy link
Closed
Closed
Feature Add support of os.chflags() on Linux platform#75494
Copy link
Labels
3.7 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

socketpair
mannequin
opened on Aug 31, 2017
Issue body actions
BPO 31313
Nosy @pitrou, @larryhastings, @socketpair
Files
  • chiflag.c
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2017-08-31.09:55:01.045>
    labels = ['3.7', 'type-feature', 'library']
    title = 'Feature Add support of os.chflags() on Linux platform'
    updated_at = <Date 2017-09-01.09:27:54.508>
    user = 'https://github.com/socketpair'

    bugs.python.org fields:

    activity = <Date 2017-09-01.09:27:54.508>
    actor = 'pitrou'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2017-08-31.09:55:01.045>
    creator = 'socketpair'
    dependencies = []
    files = ['47115']
    hgrepos = []
    issue_num = 31313
    keywords = []
    message_count = 5.0
    messages = ['301043', '301046', '301089', '301091', '301092']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'larry', 'neologix', 'socketpair']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31313'
    versions = ['Python 3.7']

    Activity

    1. socketpair commented on Aug 31, 2017

      @socketpair
      socketpairmannequin
      on Aug 31, 2017
      MannequinAuthor
      More actions

      Yes, chflags() is not supported by linux directly. But actually, Linux supports chflags functionality:

      https://stackoverflow.com/questions/34176464/why-os-chflags-doesnt-work-under-linux

      through

      ioctl (fd, EXT2_IOC_SETFLAGS, <BITMASK_OF_FLAGS>)

    2. socketpair
      added
      3.7 (EOL)end of lifeend of life
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancementA feature request or enhancement
      on Aug 31, 2017
    3. pitrou commented on Aug 31, 2017

      @pitrou
      pitrou
      on Aug 31, 2017
      Member
      More actions

      Judging by the ioctl name, this is ext2/ext3/ext4 specific?

    4. socketpair commented on Sep 1, 2017

      @socketpair
      socketpairmannequin
      on Sep 1, 2017
      MannequinAuthor
      More actions

      Well, it seems, you are right.

      But there are another ioctls (maybe they are the same, I haven't checked):

      FS_IOC_SETFLAGS
      FS_IOC_GETFLAGS

      http://man7.org/tlpi/code/online/book/files/chiflag.c.html (also attached)

    5. pitrou commented on Sep 1, 2017

      @pitrou
      pitrou
      on Sep 1, 2017
      Member
      More actions

      On Ubuntu 16.04 I get the following values:
      EXT2_IOC_SETFLAGS = 0x40086602, FS_IOC_GETFLAGS = 0x80086601

    6. pitrou commented on Sep 1, 2017

      @pitrou
      pitrou
      on Sep 1, 2017
      Member
      More actions

      Uh, of course, we care about SETFLAGS here. Which gives:
      EXT2_IOC_SETFLAGS = 0x40086602, FS_IOC_SETFLAGS = 0x40086602

    7. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    8. serhiy-storchaka
      added this to OS issues 💻on Jul 3, 2026
    9. github-project-automation
      moved this to Todo in OS issues 💻on Jul 3, 2026
    10. encukou commented on Aug 25, 2026

      @encukou
      encukou
      on Aug 25, 2026
      Member
      More actions

      FS_IOC flags are different from the stat.UF_* & stat.SF_* that os.chflags operates on.
      If we add them, they should use a different function, perhaps in fcntl or around statx, or use the chattr name.

      Feature proposals should go on Discourse nowadays; ideally with a use case.

    11. encukou
      closed this as completedon Aug 25, 2026
    12. github-project-automation
      moved this from Todo to Done in OS issues 💻on Aug 25, 2026
    13. encukou
      marked Linux's chattr i.e. ioctl(FS_IOC_SETFLAGS) is not supported in os.chflags() #87105 as a duplicate of this issue on Aug 25, 2026
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

      Projects

      • OS issues 💻
        Status
        Done
        Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.