[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fchmodat, lchmod: port to buggy Linux filesystems

From: Bruno Haible
Subject: Re: [PATCH] fchmodat, lchmod: port to buggy Linux filesystems
Date: Fri, 14 Feb 2020 04:29:18 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

The original thread's subject "XFS reports lchmod failure, but changes
file system contents" gave the impression that it's somehow XFS specific.

But what I observe is that the behaviour is the same on all major file
systems on Linux.

Tested on Linux 5.3.7 (fc31), with the trivial program below, on
  - ext4
  - btrfs
  - jfs
  - reiserfs
  - xfs
Before your latest patch: mode changed, but error "Operation not supported".
After  your latest patch: mode not changed, error "Operation not supported".


============================ lchmod.c ============================
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
int main (int argc, char *argv[])
        int mode = strtol (argv[1], NULL, 8);
        char *path = argv[2];
        int ret = lchmod (path, mode);
        if (ret < 0)
                perror ("lchmod");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]