Search code examples
debiandeb

Set files permission after install


I found this example how to build deb package.

http://blog.noizeramp.com/2005/08/31/packaging-java-applications-for-ubuntu-and-other-debians/

I'm interested how I can set files permission after files are installed?

Package: myapp
Version: _version_
Section: web
Priority: optional
Architecture: all
Maintainer: Aleksey Gureev 
Description: my first sample application which isn't
 doing anything special.
 .
 And other description goes
 here too.
 .

Solution

  • you don't. instead, you set the file-permissions while creating the package.

    when using debhelper for packaging, this would be something like the following in debian/rules:

    override_dh_fixperms:
        dh_fixperms
        find debian -name '*.jar' -exec chmod 0644 {} +
    

    and you should follow a proper Debian packaging tutorial rather than some random 10-year-old blogpost.