I have a windows executable that takes in a project file name and runs it this way, under WINE (on Lubuntu). I call the below line through a batch file that resides in the same application directory

myruntime.exe myapplicationname.prj

The project file (myapplicationname.prj) along with some other source files (python, js etc) are all in a folder in the wine c drive:\myapplication

Now as my folder contains some Proprietary code, I want to prevent the code from being copied or accessed. How can this be achieved?

In simple terms I want WINE to be able to execute the windows executable and have access to the necessary folders but I do not want anything or anyone else to access the contents of the folder.

I need to distribute little Linux(Ubuntu/Lubuntu) boxes with my application on it and I need my source to be protected. For now there is no way to compile the source files and I have spent a lot of effort writing the program. Kindly suggest.

I am a little new to Linux so having a little detailed steps will help greatly. Thanks once again. If I am not clear in my question, please let me know so that I can clarify or rephrase it.

Thanks in advance, M&M


AppArmor should be able to do things like this. It's a access control layer that can add additional conditioons on user and processes. I've never used it before though so you might have some trial and error ahead of you.

There's a fairly thorough guide on all of this on the AppArmor wiki. You'll need to layer more and more on but here's a starting point.

/usr/bin/wine {
  #include <abstractions/base>
  #include <abstractions/user-tmp>

  audit deny /path/to/directory/**    rwx,

There's also a separate wiki page on Wine applications in AppArmor. Probably worth a read.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.