You are not logged in.

#1 2014-08-19 21:57:45

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Inheriting owners or permissions without changing umask or ACLs

I am trying to see if there is a clever way to reduce the number of "chown" and "chmod" commands I type. If I open a root terminal to edit system files, sometimes I start doing stuff in "/home/connor" afterwards in that same terminal. This is a problem because any directories I create will be owned by root, not the user who is supposed to have full access in "/home/connor".

Essentially I want the following to work as a regular user:

mkdir one
# XXX
cd one
sudo mkdir two
cd two
mkdir three

For XXX, I have tried:
* chmod o+s one: This does nothing because Linux does not like owners to be inherited. So unless there is some kernel module that overrides this, it's not the way to go.
* chmod g+s one: This causes the group to be inherited, but this is not enough. I would have to change the permissions of "two" from 755 to 775 for "three" to be created successfully.
* chmod g+s one && chown 775 one: Again, I would have to change the permissions of "two". The setuid bit causes "two" to inherit the group of "one" but not the 775 permissions.

Is not being lazy the only solution here?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

Board footer

Powered by FluxBB