On Saturday 26 May 2007 15:58, Albert Hopkins wrote:
> [ Since I gone ahead and polluted the list I'll give my take ]
>
> On Sun, 2007-06-03 at 14:36 -0400, Dan Cowsill wrote:
> > It has been a constant burden to me to have to change the file
>
> permissions of
>
> > files I've copied so that other users can access them and modify them.
>
> Say I
>
> > have a number of documents in the /root folder which the root user
>
> owns.  Now
>
> > I want to transfer them to my non-priveliged user so I can work on
>
> them...
>
> > But I have to chown them so that is possible.
> >
> > It just occured to me that there must be an easier way to do things
>
> like this
>
> > and I was wondering if you fine fellows could guide me down the right
>
> path.
>
>
> In my experience it's very rare that root would need to do it.  If root
> is reserved mostly for doing those dirty sys-admin tasks then it needn't
> worry much about file sharing with those pesky users, so far as to say
> the usual root-shared files (libraries, executables, /usr/share, etc.)
>
> Usually it's the case that a) Users need to share a file with root or b)
> users need to share files with each other.  In the former case it's
> trivial.  All your file are belong to root.  In the latter case, there
> are varying methods of doing it, depending on the desired effect.  If
> it's just a one-time thing usually you'll deposit a file in /tmp
> or /var/tmp and share it there. Another way is to consider a group of
> users are working a project.  Call it project1.
>
> Create a group called project1:
>     $ groupadd project1
>
> Add users to the group:
>     $ gpasswd -a user1 project1
>     $ gpasswd -a user2 project1
>     $ gpasswd -a user3 project1
>
> Create a shared directory for the group:
>     $ mkdir -p /usr/local/projects/project1
>     $ chgrp project1 /usr/local/projects/project1
>     $ chmod g+s /usr/local/projects/project1
>
> Then, depending on your user's umask's they should all have access to
> files created in that directory.
>
> You could also use ACLs but you need make sure your kernel and toolset
> is configured for it.
>
> But I can't remember the last time i needed to share anything in /root
> with a non-root user.
> --
> Albert W. Hopkins

Hey, thanks that makes sense :)

Thanks again.
-- 
---
Dan Cowsill
http://www.danthehat.net/
GnuPG Public Key: http://www.danthehat.net/wp-content/uploads/public.asc

Attachment: pgpTNNXnqf95a.pgp
Description: PGP signature

Reply via email to