Re: default file permissions
On Sunday 09 May 2004 02:53 pm, Ulrich Fürst wrote:
> > Where is the file? I don't run Mozilla, so I'm not familiar with that.
> > Is it under /usr somewhere, or what?
>
> It's under /home/.mozilla/ ...
> In this directory and in subdirectories mozilla stores it's settings
> and the mails and so on.
OK, let's back up again. I'm still not completely clear what you have here.
I think you have
/home/you
/home/your-wife
Then you are trying to share files between each other by configuring various
things to write directly to /home instead of /home/you or /home/your-wife
Is that right?
If so, that's very strange. How do you even have write permission on /home?
What is the permission on that directory? It's supposed to be 755, and
individual users are not supposed to be able to write to /home directly
anyway. I presume you've changed this.
I guess you can do it that way if you insist, but it seems messy and difficult
to manage safely. Why not create a shared directory for the two of you with
775 permissions?
Other posts that I missed previously already explained about setting your
umask in various places. With the right umask (0000 would work, or you could
be more restrictive), and a directory you can both access it should be
possible to do what you want.
Something like this:
[root@your-box] /home
->mkdir shared-directory-demo
[root@your-box] /home
->chmod 755 shared-directory-demo
[root@your-box] /home
->chown root:your-family-group shared-directory-demo
[root@your-box] /home
->ls -ld shared-directory-demo/
drwxrwxr-x 2 root your-family-group 4096 May 9 21:04
shared-directory-demo//
[root@your-box] /home
->cd shared-directory-demo/
[root@your-box] /home/shared-directory-demo
->su you
[you@your-box] /home/shared-directory-demo
->umask 0000
[you@your-box] /home/shared-directory-demo
->touch foo
[you@your-box] /home/shared-directory-demo
->ls -l foo
-rw-rw-rw- 1 you you 0 May 9 21:04 foo
[you@your-box] /home/shared-directory-demo
->cd ..
[you@your-box] /home
->exit
exit
[root@your-box] /home/shared-directory-demo
->su your-wife
[your-wife@your-box] /home/shared-directory-demo
->umask 0000
[your-wife@your-box] /home/shared-directory-demo
->touch foo
[your-wife@your-box] /home/shared-directory-demo
->ls -l foo
-rw-rw-rw- 1 you you 0 May 9 21:05 foo
You've made a directory, chowned it to your-family-group, set it to 775 so the
group can write there. Then when you set your umask to 0 and create a file,
your wife can then modify the same file, even though you still own it.
This seems like what you want. It would probably be better to use a umask of
0007 instead, so you still have *some* control. (I should have used that in
the above example, but I'm too lazy to go back and re-do it. :)
Anyway, is this even helpful, or are you trying to do something I still don't
quite understand?
--
Michael McIntyre ---- you <dmmcintyr@users.sourceforge.net>
Linux fanatic, and certified Geek; registered Linux user #243621
http://www.geocities.com/Paris/Rue/5407/
Reply to: