[opensuse] Create files owned by non-default group
Hi, Say, I have a directory chowned to: owner "zly" (me) group "hosted" with chmod 770. This directory also have an acl wich allows user "johndoe" (u:johndoe:rwx) zly's default group is "users" and is a member of group "www-project" johndoes default group is "www-project" (and not a member of "users") Now, it it possible to define, when both of us works in this directory, and zly creates a new file, that it would be (ch)owned by the non-default group, "www-project", instead of the default group "users"? The reason for this, is that currently when zly creates a new file, johndoe does not have access to it. Perhaps a combination of umask, chmod/acl (can you set a umask for a specific directory btw) ? Or do they have to change their current working group by the command "sg" ? Maybe the question has come up before, but i couldn't find it in the archives (or, i did not use the correct keywords). Best regards Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it. Is read access ok?
Try making the directory chmod 0774 -- Kind regards, M Harris <>< -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
M Harris wrote:
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it.
Is read access ok?
Try making the directory chmod 0774
The thing is, I don't want "others" to have access to the directory at all. In fact, to simplify the question: Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of? Best regards Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 24 February 2007 16:12, Sylvester Lykkehus wrote:
M Harris wrote:
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it.
Is read access ok?
Try making the directory chmod 0774
The thing is, I don't want "others" to have access to the directory at all.
In fact, to simplify the question: Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of?
Make the directory sgid, with "chmod g+s dirname" You might also want to play around with the default ACL -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anders Johansson wrote:
On Saturday 24 February 2007 16:12, Sylvester Lykkehus wrote:
M Harris wrote:
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it.
Is read access ok?
Try making the directory chmod 0774
The thing is, I don't want "others" to have access to the directory at all.
In fact, to simplify the question: Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of?
Make the directory sgid, with "chmod g+s dirname"
You might also want to play around with the default ACL
Great, this was what I was looking for. Thanks. Best regards Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sylvester Lykkehus wrote:
Anders Johansson wrote:
On Saturday 24 February 2007 16:12, Sylvester Lykkehus wrote:
Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of?
Make the directory sgid, with "chmod g+s dirname"
Great, this was what I was looking for.
Be careful with one thing: If you move a file into that directory, it keeps its group and does not change it during the move. If you copy it, the directory's group is taken, though. (That's because a move (in a filesystem) does not create a new file, but only a new directory entry; whereas a copy really creates a new file.) Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sylvester Lykkehus wrote:
M Harris wrote:
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it.
Is read access ok?
Try making the directory chmod 0774
The thing is, I don't want "others" to have access to the directory at all.
In fact, to simplify the question: Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of?
Did you not see my note from yesterday, about setting gid? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott wrote:
Sylvester Lykkehus wrote:
M Harris wrote:
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it.
Is read access ok?
Try making the directory chmod 0774
The thing is, I don't want "others" to have access to the directory at all.
In fact, to simplify the question: Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of?
Did you not see my note from yesterday, about setting gid?
Hi James, No, I do not seem to have received that. I did receive one from Anders Johansson, which he posted to the list, suggesting to set the sgid. This, together with and default acl allowing write access to the group (setfacl d:g::rw-) has solved the issue. Thanks for your replies. Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sylvester Lykkehus wrote:
James Knott wrote:
Sylvester Lykkehus wrote:
M Harris wrote:
On Friday 23 February 2007 10:55, Sylvester Lykkehus wrote:
The reason for this, is that currently when zly creates a new file, johndoe does not have access to it.
Is read access ok?
Try making the directory chmod 0774
The thing is, I don't want "others" to have access to the directory at all.
In fact, to simplify the question: Is it possible to define, that when I create files in a specific directory, the files will not be (ch)owned to the default group, but instead as another group which I am a member of?
Did you not see my note from yesterday, about setting gid?
Hi James,
No, I do not seem to have received that. I did receive one from Anders Johansson, which he posted to the list, suggesting to set the sgid. This, together with and default acl allowing write access to the group (setfacl d:g::rw-) has solved the issue.
Thanks for your replies. Sylvester Depending on the control you want, you may also want to look at the sticky bit, which allows only the file owner or root to delete a file.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Anders Johansson
-
James Knott
-
Joachim Schrod
-
M Harris
-
Sylvester Lykkehus