![]() |
2011-05-23
, 06:59
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#2
|
The Following User Says Thank You to michaaa62 For This Useful Post: | ||
![]() |
2011-05-23
, 07:10
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#3
|
I want to create a directory automatically as user inside /home/user using the debian package , is it possible?
The Following User Says Thank You to Venemo For This Useful Post: | ||
![]() |
2011-05-23
, 07:46
|
Posts: 435 |
Thanked: 769 times |
Joined on Apr 2010
|
#4
|
The Following User Says Thank You to gionni88 For This Useful Post: | ||
![]() |
2011-05-23
, 08:13
|
Posts: 7 |
Thanked: 0 times |
Joined on May 2011
|
#5
|
![]() |
2011-05-23
, 08:45
|
Posts: 7 |
Thanked: 0 times |
Joined on May 2011
|
#6
|
How do you create the package? If you're doing it manually with dpkg -b just create the directory (which is considered like a file in Unix) in the files tree. Or you may create the directory at app runtime.
As Venemo wrote, you should leave /home/user dir, since it's mainly used for apps settings.
![]() |
2011-05-23
, 09:04
|
Posts: 435 |
Thanked: 769 times |
Joined on Apr 2010
|
#7
|
![]() |
2011-05-24
, 01:46
|
Posts: 7 |
Thanked: 0 times |
Joined on May 2011
|
#8
|
Have you tried with #!/bin/sh instead of using bash?
Anyway, copying a file to MyDocs at install time is not safe, user may have MyDocs unmounted (usb mode etc). A proper way would be a file check in your app and an eventual copy/move.
Have you tried putting the file directly in MyDocs instead of shipping it to /opt and than moving it?
How do you create the package? Madde? Scratchbox? Manual dpkg?
I want to create a directory automatically as user inside /home/user using the debian package , is it possible?
for example ,I want to create a directory
/home/user/mydata
I use the postinst , but it seems it doesn't work well, I got the following error:
mkdir: can't create directory '/home/user/mydata': Permission denied
==================================================
# dpkg -i mydeb.deb
file /var/lib/dpkg/tmp.ci/digsigsums cannot be opened
No digsigsums file
Selecting previously deselected package mydeb.
(Reading database ... 42864 files and directories currently installed.)
Unpacking mydeb (from mydeb.deb) ...
No digsigsums file
Setting up mydeb (0.1-1) ...
mkdir: can't create directory '/home/user/mydata': Permission denied
==================================================
here is the postinit:
#! /bin/bash
mkdir -p /home/user/mydata
any ideas about it?
Thanks advance for your help
Last edited by dtln; 2011-05-23 at 02:55.