1 |
On Saturday 26 May 2007, Dale wrote: |
2 |
> Dan Cowsill wrote: |
3 |
> > Hey list, |
4 |
> > |
5 |
> > It has been a constant burden to me to have to change the file |
6 |
> > permissions of files I've copied so that other users can access |
7 |
> > them and modify them. Say I have a number of documents in the |
8 |
> > /root folder which the root user owns. Now I want to transfer them |
9 |
> > to my non-priveliged user so I can work on them... But I have to |
10 |
> > chown them so that is possible. |
11 |
> > |
12 |
> > It just occured to me that there must be an easier way to do things |
13 |
> > like this and I was wondering if you fine fellows could guide me |
14 |
> > down the right path. |
15 |
> > |
16 |
> > Thanks. |
17 |
> |
18 |
> If you use KDE, you can right click on the folder that contains them |
19 |
> and change the permissions then check the box that says to make it |
20 |
> apply to everything in the folder. |
21 |
|
22 |
chmod -R |
23 |
chown -R (this one only works for root) |
24 |
|
25 |
> That way you can change a lot of |
26 |
> them at once. I also noticed a while back that if I am in Konqueror |
27 |
> as root and copy to my user desktop, it changes the permissions to my |
28 |
> regular user. I never noticed that before. |
29 |
|
30 |
Ye gods. Why are you running KDE as root ???!!!??? |
31 |
|
32 |
Dan, |
33 |
|
34 |
There's no easy way to do this. As a user you have to assign group |
35 |
and/or other access to the files manually. You can't chown them (only |
36 |
root can do that). |
37 |
|
38 |
Another alternative is to create a dir somewhere exclusively for the |
39 |
purpose of sharing stuff, make it owned by root, group owned by some |
40 |
share group. Set gid on the directory, every new file/dir |
41 |
copied/moved/created there will now be owned by the share group. Make |
42 |
sure the relevant users are members of this group: |
43 |
|
44 |
mkdir /shared-stuff |
45 |
chown -R root:share /shared-stuff |
46 |
chmod g+s /shared-stuff |
47 |
|
48 |
To set the group write permission on all these new items, either change |
49 |
the users' umask (ugh!) or use an acl (slightly less ugh!) |
50 |
|
51 |
alan |
52 |
|
53 |
-- |
54 |
Optimists say the glass is half full, |
55 |
Pessimists say the glass is half empty, |
56 |
Developers say wtf is the glass twice as big as it needs to be? |
57 |
|
58 |
Alan McKinnon |
59 |
alan at linuxholdings dot co dot za |
60 |
+27 82, double three seven, one nine three five |
61 |
-- |
62 |
gentoo-user@g.o mailing list |