Reply
Thread Tools
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#21
Ok I try do it from postinst script id DEBIAN directory.
I write these lines:
Code:
sudo gainroot
chown -R user.users /home/user/.app
but it doesnt work. What is wrong?
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#22
Originally Posted by Figa View Post
Ok I try do it from postinst script id DEBIAN directory.
I write these lines:
Code:
sudo gainroot
chown -R user.users /home/user/.app
but it doesnt work. What is wrong?
Is this directory being created in the postinst script or before packaging? If the latter, you should set the permissions before packaging as well (e.g. in the Makefile).
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#23
Directory is created by src.pro file.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#24
Originally Posted by Figa View Post
Directory is created by src.pro file.
And can you not set the permissions on the directory in there as well?
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#25
I dont know how...
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#26
Originally Posted by Figa View Post
I dont know how...
If you post the .pro file then I should be able to give some more concrete suggestions, but (from scanning the Qt documentation) it looks like you'd need to add a .extra member for the relevant INSTALLS object.
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#27
I am not in home now. I think I have in .pro file this
INSTALL appfiles
appfiles += save.txt \
candidates.txt
appfiles.path = /some/path/home/user/.app
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#28
Originally Posted by Figa View Post
I am not in home now. I think I have in .pro file this
INSTALL appfiles
appfiles += save.txt \
candidates.txt
appfiles.path = /some/path/home/user/.app
Okay, then try adding:
Code:
appfiles.extra = mkdir -m 0700 /some/path/home/user/.app; chown user.users /some/path/home/user/.app
It's a bit hackish but you shouldn't be writing user-specific data as part of the build process, so there's no clean way of implementing this.
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#29
Thank you but it doesnt work, because .pro file installs this data to deb package and after are created in fs od device. I dont know how do it right.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#30
Originally Posted by Figa View Post
Thank you but it doesnt work, because .pro file installs this data to deb package and after are created in fs od device. I dont know how do it right.
It should work - the files are installed from the deb package with the same permissions they had when packaged, so setting the permissions before packaging should persist to the installed package.

Of course, the _right_ way to do this is for your program to create the directory when run, copying any necessary contents from a template directory.
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:07.