Score:0

How can I find the minimal set of ACL changes required to grant a user access to a file?

az flag

I work on a CentOS 7 server where I frequently have to manually grant specific users access to specific files or directories. We do this using file ACLs, but I often run into an issue where I have set the ACLs on the file, but the user still cannot access it because they don't have permission to cd into the directory containing the file and/or any number of its parent directories. What follows is a tedious process of:

  1. determining which specific directory or directories the user needs to be granted access to in order to actually give them access to the file; and
  2. determining whether granting access to those directories might accidentally give them access to something else they aren't supposed to access, and making any appropriate adjustments to fix this.

Step 2 represents unavoidable complexity of the situation, but it should at least be possible to automate step 1. Specifically, given a user ID and a path to an existing file, is there a way I can get a full list of which directories along that path are not currently accessible to that user?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.