Can't modify a file programmatically in Meego/Harmattan

76 Views Asked by At

I am developing a Meego/Harmattan application, in my package there is a file x.dat that I need to write in it using my executable foo app, the Debian package succeeds and installs x.dat in /opt/foo/bin but when I debug, the application foo refuse to fopen the file successfully for a subsequent fwrite, Is this related a missing Aegis manifest entry?, what is the correct sentence of that entry and is it done manually?

Note: I tried without success to use different path for the installation of the data file x.dat, this includes trying /home/user. Thanks in advance,

1

There are 1 best solutions below

0
qwazix On

Your application does not have permission to write to /opt as it is run as user. You have to put the file in /home/user/.yourapp/ and chown it to user:user in the postinstall script. (You could also chown the file right in /opt but it is not recommended)