Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian postinst chowns install path #223

Closed
mallman opened this issue Apr 10, 2014 · 4 comments
Closed

debian postinst chowns install path #223

mallman opened this issue Apr 10, 2014 · 4 comments
Labels
debian documentation Documentation should be extended or updated

Comments

@mallman
Copy link

mallman commented Apr 10, 2014

postinst-chown includes the line

chown ${{user}}:${{group}} ${{path}}

Yet all files underneath this path are owned by root. Shouldn't it be one way or the other? (All root or all daemon user?)

@muuki88
Copy link
Contributor

muuki88 commented Apr 10, 2014

Nope. Read on the docs for exact default chown/chmod properties.

This is issue has been discussed in #170 , #174 , #178 and #210 :)

How mappings are handled

As this is still a documentation issue, I will explain the debian mappings here in a bit more detail and put them into the docs, when I got time.

You define a mapping (File, String). For linux this is done with

packageMapping( 
   file1 -> "/usr/share/file1",
   file2 -> "/usr/share/file2"
) withUser "youruser" withGroup "yourgroup"

With this definition two entries are generated in the postinst-chown, which are

chown youruser:yourgroup /usr/share/file1
chown youruser:yourgroup /usr/share/file2

If you want to own a complete directory by a specific user, user one of the MappingsHelper methods. A test build.sbt contains some examples.

Each directory/file in the mapping will then get a chown line.

@muuki88 muuki88 closed this as completed Apr 10, 2014
@muuki88 muuki88 reopened this Apr 10, 2014
@mallman
Copy link
Author

mallman commented Apr 11, 2014

The behavior I'm seeing is at odds with the documentation. The documentation says that /usr/share/<package> is owned by root. However, the packager sets the owner:group of /usr/share/<package> to <daemonUser>:<daemonGroup>. I have not modified the default mappings.

@kardapoltsev
Copy link
Member

You are right, I'll fix this today

@mallman
Copy link
Author

mallman commented Apr 11, 2014

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debian documentation Documentation should be extended or updated
Projects
None yet
Development

No branches or pull requests

3 participants