Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I stumbled across the directory /etc/ssl/private on Ubuntu (12.04), it has following permission:

drwx--x---   2 root ssl-cert  4096  7月  8  2012 private/

I wonder what does this mean for group ssl-cert? And why is it set this way?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Having execute permission on a directory is required in order to read the inodes of the files within that directory.

Within that directory is a single file, ssl-cert-snakeoil.key, which has read permission only for the ssl-cert group (and root). So this combination of permissions is the most minimal permission set that would allow a member of the ssl-cert group to access the file.

Restricting access to this file is important because it contains the private key for any services you run that make use of SSL. The idea is that only users (which in this case would correspond to services, e.g. the apache user) that require access to the key are members of this group. All other users are forbidden. The private key needs to stay secret to guarantee that you are who you say you are when a client establishes an encrypted connection to your service.

share|improve this answer
    
I see. As a supplement, I found out that ssl-cert group is disallowed from listing the directory. –  Pellaeon Lin Jan 17 '13 at 2:44
1  
@Pellaeon Lin - Yes. Listing a directory requires read permission, which isn't present here. But there's no need to list a directory if you already know the name of the file (further evidence, if any were needed, that this is intended for programmatic access, not interactive). –  ire_and_curses Jan 17 '13 at 2:47
    
@Pellaeon Lin - If you're interested in learning more about the permissions model, I highly recommend the reference quoted in this answer. –  ire_and_curses Jan 17 '13 at 3:01
    
The explanation in the reference is pretty clear, thanks! –  Pellaeon Lin Jan 17 '13 at 3:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.