Home » Questions » Computers [ Ask a new question ]

How do you find out what permissions are the default for a debian package?

How do you find out what permissions are the default for a debian package?

I have an installed debian package, upgraded many times, and the permissions on the included files are questionable. I probably changed them at some point.

Asked by: Guest | Views: 340
Total answers/comments: 1
bert [Entry]

"Use the 'dpkg -c' command to show the contents of the original archive. You should have the latest version of the package in /var/cache/apt/archives. You can retrive the .deb if you don't have it in your archives directory with aptitude download.

aptitude download <some_package>
dpkg -c some_package.deb

For example using the grep command (output truncated, you'll get the idea :)).

$ aptitude download grep
...
Get:1 http://us.archive.ubuntu.com karmic/main grep 2.5.4-4 [224kB]
$ dpkg -c grep_2.5.4-4_i386.deb
drwxr-xr-x root/root 0 2009-04-28 05:03 ./
drwxr-xr-x root/root 0 2009-04-28 05:03 ./usr/
drwxr-xr-x root/root 0 2009-04-28 05:03 ./usr/bin/
-rwxr-xr-x root/root 30 2009-04-28 05:02 ./usr/bin/rgrep

The paths listed are relative to /, of course."