Skip to content
Snippets Groups Projects
Commit 5e8ce65e authored by Simon McVittie's avatar Simon McVittie
Browse files

pv-mtree: Give a clearer error message if unable to chmod

If we can't chmod the file, we should say what the current owner and
permissions look like, to assist debugging.

In particular, this is likely to happen on NTFS or when operating on a
directory owned by a different user.

For example, if the filesystem is owned by root (steam-runtime#544)
we might say:

    Unable to change mode of ... from 0777 (owner: "root", group: "root", non-member) to 0644: ...

or if the file is owned by the current user but the filesystem does not
allow chmod anyway (steam-runtime#606) we might say:

    Unable to change mode of ... from 0755 (owner: current user, group: "users") to 0644: ...

Helps: https://github.com/ValveSoftware/steam-runtime/issues/434
Helps: https://github.com/ValveSoftware/steam-runtime/issues/460
Helps: https://github.com/ValveSoftware/steam-runtime/issues/477
Helps: https://github.com/ValveSoftware/steam-runtime/issues/491
Helps: https://github.com/ValveSoftware/steam-runtime/issues/544
Helps: https://github.com/ValveSoftware/steam-runtime/issues/606


Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 18009fcd
1 merge request!582pv-runtime: Tolerate inability to chmod files if the permissions look OK
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment