# patch command - are file modes ignored?



## luckman212 (Oct 4, 2022)

I couldn't find mention of this in the patch(1) docs so I wanted to ask here.

I've got a patch on github that I am trying to apply by downloading the commit hash with the `*.patch*` suffix. Here is the actual full url:


			https://github.com/pfsense/pfsense/commit/4884b82e3849f6c0f3f1bedb36318ce580f76391.patch
		


If you look at the contents, you can see the line that reads "`new file mode 100755`"

But, when running patch using this diff as the source, the ``wgfix.sh`` file is created without the correct permissions. (`0644` instead of `0755`)
I am running the command as root.

So my question is: does anyone know if patch is ignoring this directive, or am I doing something else wrong?


----------

