Git Product home page Git Product logo

Comments (8)

caarlos0 avatar caarlos0 commented on June 11, 2024 1

if you install in a clean system, does it have the right permissions?

from nfpm.

hamzabessa avatar hamzabessa commented on June 11, 2024 1

So the files I want to change permissions for already exist in my container, and usually I only need to change the permissions of the nfpm file. This should change the files' permissions after reinstalling the package in the container. However, it appears that this doesn't work for Debian. As a workaround, I created a post-install script to force the permission changes, and it worked.
and Yes, the usual approach worked when I tested it on a clean system, but it's not working when updating a system where the files already exists.

from nfpm.

caarlos0 avatar caarlos0 commented on June 11, 2024

there's a lot going on there, can you provide the simplest possible reproducible of the issue?

from nfpm.

hamzabessa avatar hamzabessa commented on June 11, 2024

yes, this part for example before updating it :

  - dst: "/etc/centreon-gorgone/config.d"
    type: dir
    file_info:
      owner: centreon-gorgone
      group: centreon-gorgone
      mode: 0775

  - dst: "/etc/centreon-gorgone/config.d/cron.d"
    type: dir
    file_info:
      owner: centreon-gorgone
      group: centreon-gorgone
      mode: 0775

after updating it :

  - dst: "/etc/centreon-gorgone/config.d"
    type: dir
    file_info:
      owner: centreon-gorgone
      group: centreon-gorgone
      mode: 0770

  - dst: "/etc/centreon-gorgone/config.d/cron.d"
    type: dir
    file_info:
      owner: centreon-gorgone
      group: centreon-gorgone
      mode: 0770

the permessions didn't change after the update after i checked on a Debian environment.

from nfpm.

hamzabessa avatar hamzabessa commented on June 11, 2024

I did the installation on a container where the dependencies required are present, the permessions still unchanged

from nfpm.

caarlos0 avatar caarlos0 commented on June 11, 2024

what do you mean unchanged? were the files already there? I'm not following...

from nfpm.

hamzabessa avatar hamzabessa commented on June 11, 2024

Oh i'm sorry, i did it on a clean system now and the permissions are set correctly !!

from nfpm.

caarlos0 avatar caarlos0 commented on June 11, 2024

that's the way deb works, afaik it doesn't override existing files permissions... not much we can do.

the post-install script is probably the right approach.

from nfpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.