You are not logged in.
Hello,
I recently started to grant some people access to my server via SSH. In order to tighten the security a bit (or at least the perception of it), I decided to set the perms of most of my dirs in / and / itself to root:wheel 0751. Unfortunately, pacman reset the permissions of the dirs that were involved in the -Syu procedure back to root:root 0755.
Is there any way that I can get pacman to leave the permissions as they are?
Offline
Anyone?
Offline
maybe because it thinks that it is a security-risk?
Why do you want root:wheel?
Because I, as a system admin, do need file listing in /usr /home /var and so on. If I leave it at root:root, I have the same restrictions as my users, which is what I don't want.
Apart from that, I do not believe it is done because of security reasons. After all, 0751 is less permissive than 0755 (standard), and still pacman keeps changing it back to 0755.
Thanks for anwer, anyway!
Offline
Because I, as a system admin, do need file listing in /usr /home /var and so on. If I leave it at root:root, I have the same restrictions as my users, which is what I don't want.
whats wrong with sudo?
Offline
LB06 wrote:Because I, as a system admin, do need file listing in /usr /home /var and so on. If I leave it at root:root, I have the same restrictions as my users, which is what I don't want.
whats wrong with sudo?
I could use sudo, although I do not like the idea of having to become root to get tab completion and file listing working. Then I would have to be root all the time and that reminds me of a certain OS with notoriously bad security record.
And that does not solve my problem, as I will still loose permissions with every upgrade anyway.
Offline
Is there any way that I can get pacman to leave the permissions as they are?
I'm afraid no. That how pacman works. When a package is made the system directories gets permissions root:root. When you install a package, pacman untars it and the permissions are reset to root:root. I would suggest using a small script to upgrade your system:
#!/bin/sh
pacman -Syu
chmod ...
where the last line is modified accordingly. That way, after each upgrade, the permissions will be set to your liking.
Offline
LB06 wrote:Is there any way that I can get pacman to leave the permissions as they are?
I'm afraid no. That how pacman works. When a package is made the system directories gets permissions root:root. When you install a package, pacman untars it and the permissions are reset to root:root. I would suggest using a small script to upgrade your system:
#!/bin/sh pacman -Syu chmod ...
where the last line is modified accordingly. That way, after each upgrade, the permissions will be set to your liking.
I am really sorry to hear that. I also thought about such a script, but that seemed like a workaround to me.
Offline
i had a similar problem, but with apache resetting permissions to the /home/httpd/html directory. I wanted my users to be able to copy files into there, without having to sudo (it was silly to do sudo cp).
the solution for me was to add this line to /etc/pacman.conf
NoExtract = home/httpd/html/
unfortunately, i don't think that will be much use to you, since you'd have to specify all the directories in your tree.
leaving it as 755 shouldn't be a problem... why shouldn't normal users be allowed to get a directory listing at / ?
Offline
I just want everything to be as tightly secured as possible. I know it doesn't add any real security directly (more security through obscurity), but I initially I thought it would be a low risk low maintainance kind of security enhancement.
It prevents n00bs from messing around on my system. I want everybody to whom I grant SSH access to feel as locked down as possible. It might also scare off potential crackers.
Btw it's not only about the root dir, but also about /var, /usr, /usr/*[except bin], /home, /etc, etc
Offline
It doesn't add security, and is a dirty hack for the most part.
A better solution would be to put ssh users in a reduced shell of some kind. Search google for bash restricted shells, ssh shell jails, and so forth. That would be my recommendation.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline