Question about file permissions - sharing data files between multiple users

Question about file permissions - sharing data files between multiple users

Post by Steve Lew » Sat, 22 Feb 2003 15:44:59



I'm a relative newcomer to Linux.  Lately, I've been using GNUCash,
but I've run into trouble trying to set things up so that the data
files are accessible my user account, as well as my wife's.
I have a user account created for both myself and my wife.  I've
defined a group that contains both user accounts.  I then went to the
directory where the GNUCash data files are located, and changed the
owning group so that we should both have access to the files.  Problem
is that sometimes a new data file will be created, and it gets created
with a default permission that is accessible only for the current
user.

Is there a better way to set things up so that more than one user can
access these files, and so that when new files are created in this
directory, they get a default access provided that allows both users
to use that file?

Thanks for any help!
Steve Lewis

 
 
 

Question about file permissions - sharing data files between multiple users

Post by rnich.. » Sun, 23 Feb 2003 01:59:07



:I'm a relative newcomer to Linux.  Lately, I've been using GNUCash,
:but I've run into trouble trying to set things up so that the data
:files are accessible my user account, as well as my wife's.
:I have a user account created for both myself and my wife.  I've
:defined a group that contains both user accounts.  I then went to the
:directory where the GNUCash data files are located, and changed the
:owning group so that we should both have access to the files.  Problem
:is that sometimes a new data file will be created, and it gets created
:with a default permission that is accessible only for the current
:user.

It sounds like you got it _almost_ right.  You need to set the "set-GID"
bit in the _directory_ permissions ("chmod g+s <dirname>") so that any
files or subdirectories created there will inherit the GID of the
directory.  You also need to set each user's umask so that files are
created group-writable by default (probably "umask 002").

Note that for this to work properly each user's primary group (the one
listed in /etc/passwd) must be unique to that user.  Otherwise, that
user will be creating files writable by others when that behavior is not
intended.

--


 
 
 

1. Reading data from multiple files to a single file

I have a shell script that is reading information from 37 ports and
updating information into 37 different files. However, i would like to
combine these 37 files periodically into one big file, so that it is
ready to be loaded into my RDBS. Since my shell is kind of a login script
for the ports, each port runs a seperate specific instance, and I am
trying to launch a daemon which appends all these files into one file.

Any suggestions on a clean way to do this? Would there be problems
appending these files together when they are been written to, Can I read
data from all these files and write them out to the BIG file,
periodicaly?

Thanks in advance, I have some ideas for this, but I open to suggestions,
since I am not too sure about how this will work.

--
Saqib Mausoof
--------------------------------------------------------------------
I have a hard enough time speaking for myself, so speaking on behalf
of my employer is out of the question.

2. Question about root/filesystem on NFS ?

3. File Permission Changing when user edits file (Samba)

4. Hacking UNIX

5. Gator eWallet Insecure User Data files Encryption and Gator BackUp / Banner Server Access/File retrieving

6. Question

7. Multiple users can't share MS Access file

8. SRN 811-960

9. Writing data from Kernel to a data file in user space

10. - Two questions: find files with specific permission, find files that belong to..

11. how do i concatenate multiple files then split them into multiple files