[fpc-pascal] Issue with deploying linux application in /opt directory

Michael Van Canneyt michael at freepascal.org
Mon Sep 3 21:12:31 CEST 2012



On Mon, 3 Sep 2012, Krzysztof wrote:

> Hi,
>
> I have script which install my application in /opt/myapp directory.
> This script check if user is root so it can set permissions to read
> and access as executable. Everything works fine. After installation I
> can run this application, but It doesn't has access to the internet. I
> must manually set owner to whole application directory: "sudo chown
> MY_NAME -R /opt/myapp". Now, I have access to internet. Does anyone
> know how to properly prepare installation script which set permissions
> in /opt directory? User should simply extract zipped application, run
> setup skrypt and run app

That is the wrong approach to solving the problem.

You should find out why your app needs to write to this location, and remove that need.

strace -o /tmp/log /opt/myapp/myapp.bin

will write all kernel calls to /tmp/log. There you can look for a call
   open("/opt/myapp/something", O_CREATE||O_WRITE) = -1
to see what file it attempts to write.

Michael.



More information about the fpc-pascal mailing list