Linux Group directory's and subdirectory problems

  • Thread starter Thread starter Nairel2
  • Start date Start date
N

Nairel2

Hey everybody,

Being new here at linuxforums.org, this was my last resort for finding reliable information to help me furthur my work. I have a situation here that is quite bothersome and hopefully I have come to the right address.

This is my problem:

I am using VMware Workstation environment and within I have a CentOS virtual machine. Here, I am trying to build a infrastructure, where a lot of users and groups are being made. But I'm trying to put all of that into 1 script, so when I bash the script, everything is done. I'm going to try to give a example.

There are 5 groups: Direction, Research and Development, Sales, Servicedesk and Human Rescources.
Lets take the Sales group for now.

The Sales group has it's own directory located at /home/KM/Sales. There are 2 members of Sales, Jesse and James. Jesse and James can save files into the Directory Sales and are supposed to change each others files aswell. So:

- They both need to be able to edit each others files
- Only the owner can remove the file created
- When new file or subdirectories are made, the above 2 must apply too. Of course other groups are not a

Now here's the problem: I'm using this command

chmod 1770 /home/KM/Sales
chmod g+s /home/KM/Sales

Now, when I test it and make a file or folder with Jesse in group Sales, it goes fine, but when James comes along and tries to edit that file, it goes wrong. I can open the file, but I can't edit it or save it.

This is a long post maybe for some of you, but if you did read this, I appreciate it and I hope you will be able to help me with this. Hopefully I've been clear about this and that you all can understand the situation. If you have questions about this, just ask them and I will answer.

Continue reading...
 
Back
Top