coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

chmod fails to change permissions if files missing

Open OH-AU opened this issue 2 years ago • 2 comments

This behaviour is different to the GNU utilities: Tested with coreutils ver. 0.0.17

In a directory that contains only .py files (and therefore no .sh files) chmod u+x *.sh *.py

Rust reports: chmod: cannot access '*.sh': No such file or directory and does NOT change the execute bit on any files.

gnu reports: /usr/bin/chmod: cannot access '*.sh': No such file or directory but DOES change the permissions of existing .py files

OH-AU avatar Feb 13 '23 09:02 OH-AU

Thanks! Should be a good first issue. We just need to print the error and continue execution instead of returning with the error. The easiest reproduction is:

$ touch b
$ chmod u+x a b

tertsdiepraam avatar Feb 13 '23 09:02 tertsdiepraam

Will give this a try, seems pretty easy :). Have done bit similar for another issue

dmatos2012 avatar Feb 13 '23 15:02 dmatos2012