![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help me in sending parameters from sqlplus script to unix shell script | Hara | Shell Programming and Scripting | 2 | 01-29-2008 12:31 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 12:06 AM |
| here document to automate perl script that call script | hogger84 | Shell Programming and Scripting | 3 | 10-22-2007 07:15 AM |
| Modify Perl script to work with txt - Permissions script | joangopan | Shell Programming and Scripting | 1 | 09-12-2007 08:38 PM |
| newgrp command | Nathe | UNIX for Advanced & Expert Users | 2 | 12-15-2003 07:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
I see that you don't get what I want to do... sorry for my expression in english !!
My project TOTO have a primary group B and a secondary group A My account have a primary group A and a secondary group B My colleague C1 has a primary group A and a secondary group B My colleague C2 has only a primary group A When I work for TOTO I'd like to have right to write on, from my own account. Same for my colleague C1. C2 is able to read but not write on TOTO. For the moment, I have a script wich check if you are authorized to work on the project. If 'yes' the umask is set to 002 and I do newgrp and so on. So that each created file is AUTOMATICALLY created with the group B. I don't have 'root' permissions. So I can not execute 'chgrp' on the account TOTO for all the files don't belong to me. My application create a lot of files/directory so it is hard to do 'chgrp' each 5 minutes and more hard to request to each user to do the same!! I try to forget newgrp but... I can't !! |
| Forum Sponsor | ||
|
|
|
#9
|
||||
|
||||
|
If you need help from your system administrator, get it! System admins are paid to help people like you. Still, you can probably handle this without help....
It is hard to set set the sgid bit on a directory with Solaris. But it can be symbolically. mkdir somedir chgrp groupb somedir chmod g+s somedir Now every file created in somedir will get a group of groupb. If you can write to a directory, you really can change the group of a file in that directory: cd somedir cp somefile somefileNEW rm somefile mv somefileNEW somefile You seem to be able to write scripts, this should be a 5 minute job. You need to get everyone to "umask 002". Ask them to put it in their .profiles. |
|
#10
|
|||
|
|||
|
I ask my local support but I have no reply...
I've made a script which do the copy and then the remove of directories of the project account. I works well. I just have to launch it one or two times a day. Thanks for your help. |
|
#11
|
||||
|
||||
|
Notice the "chmod g+s dir" trick. Once you do that, all new files get the correct group automatically.
You should not need to rerun your script ever. You just run it once to get the old files right. |
|
#12
|
|||
|
|||
|
Goog trick !!
Thanks !! |
|||
| Google The UNIX and Linux Forums |