public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* Re: [gentoo-user] File permissions and such
  2007-06-03 18:36 [gentoo-user] File permissions and such Dan Cowsill
@ 2007-05-26 18:55 ` Albert Hopkins
  2007-05-26 19:07   ` Dan Cowsill
  2007-05-26 19:31   ` Albert Hopkins
  2007-05-26 19:07 ` Dale
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Albert Hopkins @ 2007-05-26 18:55 UTC (permalink / raw
  To: gentoo-user

Don't know if you're aware of this, but the emails you are sending have
Date headers which are WAY into the future.  For example, the email you
sent that I'm applying to (which I think was sent today) is dated. June
03.  Another one you sent a few days ago was dated 31 May.

The relevant headers:

From: Dan Cowsill <danthehat@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] File permissions and such
Date: Sun, 3 Jun 2007 14:36:07 -0400
User-Agent: KMail/1.9.5
Message-Id: <200706031436.13432.danthehat@gmail.com>

--
Albert W. Hopkins

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-06-03 18:36 [gentoo-user] File permissions and such Dan Cowsill
  2007-05-26 18:55 ` Albert Hopkins
@ 2007-05-26 19:07 ` Dale
  2007-05-28 11:52   ` Alan McKinnon
  2007-05-26 19:40 ` Dirk Heinrichs
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Dale @ 2007-05-26 19:07 UTC (permalink / raw
  To: gentoo-user

Dan Cowsill wrote:
> Hey list,
>
> 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.
>
> Thanks.
>   

If you use KDE, you can right click on the folder that contains them and
change the permissions then check the box that says to make it apply to
everything in the folder.  That way you can change a lot of them at
once.  I also noticed a while back that if I am in Konqueror as root and
copy to my user desktop, it changes the permissions to my regular user. 
I never noticed that before.

Does that help?

Dale

:-)  :-)  :-)

-- 
www.myspace.com/-remove-me-dalek1967

Copy n paste then remove the -remove-me- part.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-26 18:55 ` Albert Hopkins
@ 2007-05-26 19:07   ` Dan Cowsill
  2007-05-26 19:31   ` Albert Hopkins
  1 sibling, 0 replies; 13+ messages in thread
From: Dan Cowsill @ 2007-05-26 19:07 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

On Saturday 26 May 2007 14:55, Albert Hopkins wrote:
> Don't know if you're aware of this, but the emails you are sending have
> Date headers which are WAY into the future.  For example, the email you
> sent that I'm applying to (which I think was sent today) is dated. June
> 03.  Another one you sent a few days ago was dated 31 May.
> --
> Albert W. Hopkins

I wasn't aware, thanks :)

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-26 18:55 ` Albert Hopkins
  2007-05-26 19:07   ` Dan Cowsill
@ 2007-05-26 19:31   ` Albert Hopkins
  1 sibling, 0 replies; 13+ messages in thread
From: Albert Hopkins @ 2007-05-26 19:31 UTC (permalink / raw
  To: gentoo-user

Sorry about that going to the list.  It was meant to be a direct reply.

--
Albert W. Hopkins

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-06-03 18:36 [gentoo-user] File permissions and such Dan Cowsill
  2007-05-26 18:55 ` Albert Hopkins
  2007-05-26 19:07 ` Dale
@ 2007-05-26 19:40 ` Dirk Heinrichs
  2007-05-26 19:58 ` Albert Hopkins
  2007-06-01 11:03 ` Alan McKinnon
  4 siblings, 0 replies; 13+ messages in thread
From: Dirk Heinrichs @ 2007-05-26 19:40 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Am Sonntag, 3. Juni 2007 schrieb Dan Cowsill:

> 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.

I guess you should use a shared directory together with a dedicated group, for 
example:

1) Create a group "workers" and add all users which should work on the same 
set of documents to this group (users must log out and in again for the 
change to be visible for them).

2) Create a new directory for shared documents, lets say "/work", chown it 
to "root:workers" and and set the "s" bit for the group (chmod g+s /work). 
This way, all files created in this directory will automatically be assigned 
to group "workers".

Another posibility would be to use ACLs.

HTH...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-06-03 18:36 [gentoo-user] File permissions and such Dan Cowsill
                   ` (2 preceding siblings ...)
  2007-05-26 19:40 ` Dirk Heinrichs
@ 2007-05-26 19:58 ` Albert Hopkins
  2007-05-26 20:13   ` Dan Cowsill
  2007-06-01 11:03 ` Alan McKinnon
  4 siblings, 1 reply; 13+ messages in thread
From: Albert Hopkins @ 2007-05-26 19:58 UTC (permalink / raw
  To: gentoo-user

[ 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

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-26 19:58 ` Albert Hopkins
@ 2007-05-26 20:13   ` Dan Cowsill
  0 siblings, 0 replies; 13+ messages in thread
From: Dan Cowsill @ 2007-05-26 20:13 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2487 bytes --]

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 #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-26 19:07 ` Dale
@ 2007-05-28 11:52   ` Alan McKinnon
  2007-05-28 12:10     ` Neil Bothwick
  2007-05-28 19:58     ` Dale
  0 siblings, 2 replies; 13+ messages in thread
From: Alan McKinnon @ 2007-05-28 11:52 UTC (permalink / raw
  To: gentoo-user

On Saturday 26 May 2007, Dale wrote:
> Dan Cowsill wrote:
> > Hey list,
> >
> > 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.
> >
> > Thanks.
>
> If you use KDE, you can right click on the folder that contains them
> and change the permissions then check the box that says to make it
> apply to everything in the folder.

chmod -R
chown -R (this one only works for root)

> That way you can change a lot of 
> them at once.  I also noticed a while back that if I am in Konqueror
> as root and copy to my user desktop, it changes the permissions to my
> regular user. I never noticed that before.

Ye gods. Why are you running KDE as root ???!!!???

Dan,

There's no easy way to do this. As a user you have to assign group 
and/or other access to the files manually. You can't chown them (only 
root can do that).

Another alternative is to create a dir somewhere exclusively for the 
purpose of sharing stuff, make it owned by root, group owned by some 
share group. Set gid on the directory, every new file/dir 
copied/moved/created there will now be owned by the share group. Make 
sure the relevant users are members of this group:

mkdir /shared-stuff
chown -R root:share /shared-stuff
chmod g+s /shared-stuff

To set the group write permission on all these new items, either change 
the users' umask (ugh!) or use an acl (slightly less ugh!)

alan

-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-28 11:52   ` Alan McKinnon
@ 2007-05-28 12:10     ` Neil Bothwick
  2007-05-28 14:45       ` Alan McKinnon
  2007-05-28 19:58     ` Dale
  1 sibling, 1 reply; 13+ messages in thread
From: Neil Bothwick @ 2007-05-28 12:10 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Mon, 28 May 2007 13:52:34 +0200, Alan McKinnon wrote:

> > I also noticed a while back that if I am in Konqueror
> > as root and copy to my user desktop, it changes the permissions to my
> > regular user. I never noticed that before.  
> 
> Ye gods. Why are you running KDE as root ???!!!???

He's not, otherwise the desktop would belong to root as well as the
Konqueror process.

-- 
Neil Bothwick

Copper wire was invented by two Scotsmen fighting over a penny!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-28 12:10     ` Neil Bothwick
@ 2007-05-28 14:45       ` Alan McKinnon
  0 siblings, 0 replies; 13+ messages in thread
From: Alan McKinnon @ 2007-05-28 14:45 UTC (permalink / raw
  To: gentoo-user

On Monday 28 May 2007, Neil Bothwick wrote:
> On Mon, 28 May 2007 13:52:34 +0200, Alan McKinnon wrote:
> > > I also noticed a while back that if I am in Konqueror
> > > as root and copy to my user desktop, it changes the permissions
> > > to my regular user. I never noticed that before.
> >
> > Ye gods. Why are you running KDE as root ???!!!???
>
> He's not, otherwise the desktop would belong to root as well as the
> Konqueror process.

Ah yes, my bad. I didn't realise at first that Dale meant he started 
konqueror as root from a desktop running as a user

alan


-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-05-28 11:52   ` Alan McKinnon
  2007-05-28 12:10     ` Neil Bothwick
@ 2007-05-28 19:58     ` Dale
  1 sibling, 0 replies; 13+ messages in thread
From: Dale @ 2007-05-28 19:58 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1509 bytes --]

Alan McKinnon wrote:
> On Saturday 26 May 2007, Dale wrote:
>   
>> Dan Cowsill wrote:
>>     
>>> Hey list,
>>>
>>> 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.
>>>
>>> Thanks.
>>>       
>> If you use KDE, you can right click on the folder that contains them
>> and change the permissions then check the box that says to make it
>> apply to everything in the folder.
>>     
>
> chmod -R
> chown -R (this one only works for root)
>
>   
>> That way you can change a lot of 
>> them at once.  I also noticed a while back that if I am in Konqueror
>> as root and copy to my user desktop, it changes the permissions to my
>> regular user. I never noticed that before.
>>     
>
> Ye gods. Why are you running KDE as root ???!!!???
>   

I'm not running KDE as root, I'm running Konqueror as root.  Actually,
mine is set up so you can't run KDE as root.  We all should know that is
not a good idea.

Dale

:-)  :-)  :-)

-- 
www.myspace.com/-remove-me-dalek1967

Copy n paste then remove the -remove-me- part.


[-- Attachment #2: Type: text/html, Size: 2216 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] File permissions and such
  2007-06-03 18:36 [gentoo-user] File permissions and such Dan Cowsill
                   ` (3 preceding siblings ...)
  2007-05-26 19:58 ` Albert Hopkins
@ 2007-06-01 11:03 ` Alan McKinnon
  4 siblings, 0 replies; 13+ messages in thread
From: Alan McKinnon @ 2007-06-01 11:03 UTC (permalink / raw
  To: gentoo-user

On Sunday 03 June 2007, Dan Cowsill wrote:
> Hey list,
>
> 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.

A custom script? Maybe something like (named as chowncp)

#!/bin/bash
#
chown $1 $2
cp $2 $3

Permissions would be something like x only for owner (root), called 
something like this:

chowncp dan <file1> <file2>

It's way incomplete, I'll let you figure out your own '[ -f ...' checks 
but you get the idea.

I'm also sure ext3/reiser acls can force ownership of new files (it can 
do it for groups), but I'm way too lazy to figure it out right now, it 
being Friday and all...

alan

-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-user] File permissions and such
@ 2007-06-03 18:36 Dan Cowsill
  2007-05-26 18:55 ` Albert Hopkins
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Dan Cowsill @ 2007-06-03 18:36 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

Hey list,

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.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-06-01 11:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 18:36 [gentoo-user] File permissions and such Dan Cowsill
2007-05-26 18:55 ` Albert Hopkins
2007-05-26 19:07   ` Dan Cowsill
2007-05-26 19:31   ` Albert Hopkins
2007-05-26 19:07 ` Dale
2007-05-28 11:52   ` Alan McKinnon
2007-05-28 12:10     ` Neil Bothwick
2007-05-28 14:45       ` Alan McKinnon
2007-05-28 19:58     ` Dale
2007-05-26 19:40 ` Dirk Heinrichs
2007-05-26 19:58 ` Albert Hopkins
2007-05-26 20:13   ` Dan Cowsill
2007-06-01 11:03 ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox