Building an app wipes NTFS permissions on .exe

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 7 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
powdan
Posts: 3
Last visit: Tue Mar 21, 2017 1:54 pm

Building an app wipes NTFS permissions on .exe

Post by powdan »

Product, version and build: PowerShell Studio 2016 v5.3.131
32 or 64 bit version of product: 64
Operating system: Windows 8.1 Enterprise
32 or 64 bit OS: 64


Hi, I have a full licence of the software but can only seem to post in this forum. I have deployed a powershell multi form app but after building, Powershell Studio removes me from having any NTFS permissions to the .exe. It has built fine previously but then randomly changes NTFS permissions. If i change the platform for the build between x86 and x64 it builds again, but then after a few builds it changes the NTFS permissions again so that i cannot delete, re build or run the .exe.

This seems to be completely random. I have tried to change all subfolders and objects to match inherited permissions from the parent folder, but it doesnt work. It is just the .exe this is affecting, i can open the config file in the same folder fine.
User avatar
J A Reif
Posts: 241
Last visit: Fri Mar 22, 2024 8:12 am
Answers: 1
Has voted: 1 time
Been upvoted: 1 time

Re: Building an app wipes NTFS permissions on .exe

Post by J A Reif »

Hello, you do not have access to the product support forum because there are no subscriptions registered under your user name. If you log in with the account under which your subscription is registered, you will have access to the product support forums.
June Alane Reif
SAPIEN Technologies, Inc.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: Building an app wipes NTFS permissions on .exe

Post by DevinL »

You mention that you deployed the app but then after building it, PowerShell Studio is removing your NTFS permissions. Can you elaborate on what you mean exactly?

Usually, when you deploy an app you build it, then deploy it to the desired location. If you could provide some more detail on the steps you're taking I'd be happy to help you further.
DevinL
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Building an app wipes NTFS permissions on .exe

Post by Alexander Riedel »

I should point out that there is absolutely no code in the packager to modify or delete NTFS permissions of any file.
Did you verify the altered permissions directly or are you inferring they are modified because you cannot delete or overwrite the target file?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
powdan
Posts: 3
Last visit: Tue Mar 21, 2017 1:54 pm

Re: Building an app wipes NTFS permissions on .exe

Post by powdan »

Hi All,

Thanks for the replies. By build/deploy i mean build. I ought to stop using those interchangeably.

If i hit build i get an error of 'Error: Cannot rename output file to specified name.' When looking at the file itself I can see other files (one config file) in the folder and open this fine, but the .exe itself cannot run as i 'may not have permissions' When i check permissions on the containing folder I have full access and inheritance is enabled, but checking NTFS on the .exe file itself shows that I have no access, even though I am local admin on the PC.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Building an app wipes NTFS permissions on .exe

Post by Alexander Riedel »

That's quite odd. As I said we do not change any permissions on any file. What is the exact path and name of the exe? Can there be some kind of virus scanner, whitelist app running that would do that in your environment?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
powdan
Posts: 3
Last visit: Tue Mar 21, 2017 1:54 pm

Re: Building an app wipes NTFS permissions on .exe

Post by powdan »

It's building to the default local directory of C:\Users\username\Documents\SAPIEN\PowerShell Studio\Projects\projectname\x86 (or x64)

Ive tried disabling the virus software but it's having none of it. But as I said it's very odd as it originally built on the 32 bit platform, then when it wouldnt overwrite i changed the build platform to x64 and it built, assuming it was bugged. After a while it did the same to the x64 build output so immediately tried to change back to 32 thinking perhaps a file lock or handle had expired and it built. But now x64 wont overwrite. If one doesnt work the other seems to.

Could it be a bug with the software? Ive only had this issue since upgrading from 2015 to 2016. Ill also raise again with our systems team to see if they can dig any deeper. Naturally ill post if it turns out to have been something our side. I was more curious to see if anybody else had experienced this.

Thanks again for the swift replies.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Building an app wipes NTFS permissions on .exe

Post by Alexander Riedel »

It's a little bit strange that this appears to be random. Normally the only reason the file cannot be overwritten is when the process is actually running.
I would suggest this: Use the platform that generates an error. Reboot. Build again.
If the error goes away, then it is locked by a process that is running. If it truly an NTFS permission issue it would 'survive' a reboot.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 7 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.