![]() |
2010-04-21
, 08:25
|
Posts: 318 |
Thanked: 735 times |
Joined on Oct 2009
|
#2
|
![]() |
2010-04-21
, 08:44
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#3
|
![]() |
2010-04-21
, 08:59
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#4
|
From what I've read, debian packages install with the same permissions as when packaged, so try changing the permissions on the file prior to packaging.
![]() |
2010-04-21
, 08:59
|
Posts: 299 |
Thanked: 241 times |
Joined on Oct 2009
@ Singapore
|
#5
|
![]() |
2010-04-21
, 10:58
|
Posts: 299 |
Thanked: 241 times |
Joined on Oct 2009
@ Singapore
|
#6
|
#!/bin/sh # postinst script for qsportsevent # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * <postinst> `configure' <most-recently-configured-version> # * <old-postinst> `abort-upgrade' <new version> # * <conflictor's-postinst> `abort-remove' `in-favour' <package> # <new-version> # * <postinst> `abort-remove' # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' # <failed-install-package> <version> `removing' # <conflicting-package> <version> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) chmod 666 /home/user/qsportsevent.db ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0
![]() |
2010-04-21
, 12:51
|
Posts: 299 |
Thanked: 241 times |
Joined on Oct 2009
@ Singapore
|
#8
|
![]() |
2010-04-21
, 12:59
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#9
|
The Following User Says Thank You to Joorin For This Useful Post: | ||
![]() |
2010-04-21
, 13:01
|
Posts: 299 |
Thanked: 241 times |
Joined on Oct 2009
@ Singapore
|
#10
|
On a tangential note I'd say it's not the best to place application resources directly in the user's home directory.
I have an app that installs a SQLITE .db file. The .db file is included in my installation package, but on the device it will have permissions set to 644. When I run my app, I hit errors that the database is read only. When I do root + chmod 666 on the .db file, the app will work just fine again. How do I modify the permissions from the outset? I obviously don't want all my users to have to do chmod manually. I even try to change the permissions in code using the Qt setPermissions method, but that didn't to do the work either...
I sort of expect to change something like this:
My Maemo Apps:
QTeachMe - Flashcard app
MobiTifo (which was formerly known as QSportsEvent) - Sports leagues tracking (mainly football).