How to change the group of a file want others to access

1. Go into terminal
2. Navigate to the folder you'd like to change permissions on using cd and ls. Use ls -l to find out what permissions currently exist on a certain file or folder.
3. Type in chgrp -R newgroupname foldername

4. To change permissions on a certain file, Use the chmod command. It will take arguments like chmod g+w RAs . This would allow everyone in the group "staff" to write things in the RAs folder.

1. chmod in detail

Unix files have three kinds of permissions (read, write, execute) for three parties (user, group, other).
On the command line:

To give everyone full permission to a file:

chmod ugo+rwx filename

That's generally considered too much, so next we'll take away write and execute from other:

chmod o-wx filename

And then take away execute from the group:

chmod g-x filename

But to get that result in the first place we could do:

chmod g+rw filename
chmod o+r filename

What if you wanted to do that in one step? Well, it's possible. Permissions can also be set using a numerical system, where read = 4, write = 2, and execute = 1. The parties are represented positionally under this system in the order user, group, other. So to give full (rwx) permission to the user, read and write (rw) to the group and read (r) to other:

chmod 764 filename

ChmodChgrp (last edited 2011-08-09 21:01:06 by echidna)

MoinMoin Appliance - Powered by TurnKey Linux