Skip to content

Suggestion: Read only flag #59

@jamespharvey20

Description

@jamespharvey20

I needed to view my hard drive with hexedit. To modify the disk, I would need to intentionally/unintentionally make changes and then intentionally/unintentionally press F2 or Ctrl+W to save. Although hopefully this would never happen unintentionally, I would love to see a --readonly flag added to the program to be able to run hexedit as a viewer only without having any risk of modifying the file/device. Some other hex editors have the ability to start in read-only mode. (i.e. ncurses-hexedit).

I think this would be useful for files in addition to disks.

Alternatively, someone could do this if they only had read permission to the file/device, but in the case of editing a block device (at least on Arch which defaults to rw for owner and group and nothing for others) that would require changing the permissions of the block device which could have unintended side effects. Perhaps adding permissions for others to read the block device and then running hexedit as a user without being in the disk group wouldn't be too bad, especially because I believe the permissions reset on reboot, but I still think it would be worthwhile to add as an option.

Activity

prigaux

prigaux commented on Jun 21, 2022

@prigaux
Collaborator

pull request accepted 👍

added a commit that references this issue on Sep 29, 2022
added a commit that references this issue on Sep 29, 2022
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

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @prigaux@jamespharvey20

        Issue actions