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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to