LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 06-17-2005, 01:17 PM   #1
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
Setting group on file creation/edit


I'm trying to setup some permissions on my CVS repository so that I can give a friend access to help me work on a project. My first thought was to create a cvs group, add us both to it, and then set the group of the cvs directory to cvs, with read/write permissions.

That works, but, when adding or editing files, those files show up in the CVS repository with a group of users, and owner of whoever added/modified the file. That doesn't break the access for me and my friend doing the CVS work, but it does open it up to other users on my system who I DON'T necessarily want to give write access to those files.

I could make the cvs group the primary group for us, but then every new file we create will be created with access to cvs group, which seems kind of messy.

Is there any way I can get just those files in the CVS repository to be created/modified with the cvs group automatically?
 
Old 06-17-2005, 02:43 PM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
You could mount a partition as the directory and use grpid as an option for it in fstab. It then creates files set to the same group that the mountpoint has.
 
Old 06-17-2005, 03:53 PM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Original Poster
Rep: Reputation: 31
Yeah, that would work. Any other ideas that don't involve re-partitioning my system?
 
Old 06-17-2005, 04:29 PM   #4
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
If you set the setgid bit on a directory (with chmod g+s directory), files created in that directory will have their group set to the directory's group.
 
Old 06-17-2005, 04:50 PM   #5
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Original Poster
Rep: Reputation: 31
Thanks Noth. Exactly what I was looking for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
default group on file creation antony.booth Linux - Security 3 08-24-2007 06:36 AM
Programming Timers (creation, setting)in FC3 juan_de_margo Fedora 1 02-14-2005 11:34 PM
Setting group automatically upon file creation (local web development configuration) jht2k Linux - Newbie 1 02-11-2005 06:05 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM
Which file to edit for setting static IP? nidputerguy Linux - Networking 4 12-22-2003 01:16 PM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration