Skip to content

So long Notepad++, and thanks for all the chmod +x

Last updated on February 12, 2017

Just as soon as I post about changing from Notepad2 to Notepad++ I’m changing back as I’ve discovered an annoying issue where editing a Linux shell script with executable permissions over a samba share, removes the executable permissions.

What I can’t figure out is why it’s only removing the user’s execute permission. I had thought perhaps it was deleting and recreating the file, which would cause the share’s create mask to remove execute permissions, but that’s not it. If a file is set 0775, it will become 0655 after a save.

I may have a workaround for it in a few days, but for now I’m back to using notepad2 for my editing needs.

Published inRantsSoftware


  1. 2.5 years later I think I know what the problem is 🙂
    I believe notepad++ is setting/resetting the dos file “archive” attribute.

    By Default Samba uses this to manage the execute attribute for user permissions.

    So, if you set the Samba parameter:
    map archive = no

    The attribute is not mapped and user execute permissions are retained as per what they were set to previously.

  2. Jason

    Thanks for the tip.

    Wow, serious WTF samba there. The permission mapping between DOS and Unix is just bizarre, IMO.

    Read only maps to owner/write and owner/read.
    Archive maps to owner/execute.
    System maps to group/execute.
    And hidden maps to world/execute.

Comments are closed.