We execute sudo when writing

    In addition to the previous note “ Making script files executable ” ...

    In the practice of the system administrator, it sometimes happens that you start to edit some script that automates the backup process, for example, and in the end it turns out that there are not enough write permissions to this file, which possibly belongs to the root user. In order not to dodge much in a similar situation, we save the changes by the command
    :w !sudo tee %

    Security issues in this case are within sudo.

    Also popular now: