# File permissions being reset after using appimagetool

**URL:** <https://discourse.appimage.org/t/file-permissions-being-reset-after-using-appimagetool/2761>\
**Category:** Creating AppImages\
**Created:** [June 26, 2022, 6:58pm UTC](https://discourse.appimage.org/t/file-permissions-being-reset-after-using-appimagetool/2761 "2022-06-26T18:58:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickifunk](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/rickifunk/32/731_2.png) [@rickifunk](https://discourse.appimage.org/u/rickifunk)\
**Post date:** [June 26, 2022, 6:58pm UTC](https://discourse.appimage.org/t/file-permissions-being-reset-after-using-appimagetool/2761/1 "2022-06-26T18:58:28Z")

</div>

I am currently building a .NET6.0 application and then moving the files to my **AppDir/usr/bin** folder.  
After moving the files, i run chmod on the target file to set the permissions and make it executable, but after running the **appimagetool** to generate my appimage, the **AppRun** file complains about permission denied when it tries to run the target executable.

I ran a **ls -l** on the file prior to packaging it, and after, using **–appimage-extract** to access the files and the permission does indeed change from **-rwxr-xr-x** to **-rw-r–r–**

Might be worth noting that this runs in a build pipeline. A weekish ago when i were learning about app images, i did manage to build and run the appimage manually on the same machine. This issue now occurs during the pipeline which runs on a different machine, but i still download the appimage and try to run it on the same machine that i used last week.

**Update**  
I got it working. From C# i were running a bash process to chmod the file, but by adding the chmod command to a bash script on the machine that is generating the appimage, and then running said bash script through C#, it suddenly worked.
