I am packaging one of my projects on Debian. The project expects a directory to be created at
~/.local/share/ where the data files will be kept. Now I am trying to create and feed the initial data using
postinst script shipped with the
.deb package. The problem is since packages are installed as root, the directory is getting created as root and the user who is installing it won't have write permission on it.
My question is how can I create the directory so that the user who is installing the package will have write permission on it and all subdirectories?