|
|
Line 1: |
Line 1: |
| == chmod ==
| |
| You can change file permissions with:
| |
| <console>$ chmod [r][g][u] [file]</console>
| |
| [r] = number for root permissions, [g] = number for group permissions and [u] = number for user permissions.
| |
| <pre>7 = 4+2+1 (read/write/execute)
| |
| 6 = 4+2 (read/write)
| |
| 5 = 4+1 (read/execute)
| |
| 4 = 4 (read)
| |
| 3 = 2+1 (write/execute)
| |
| 2 = 2 (write)
| |
| 1 = 1 (execute)</pre>
| |
|
| |
|
| == chown ==
| |
| You can change owner and group of file with:
| |
| <console># chown [user]:[group] [file]</console>
| |
| You can change owner of folder and files inside recursively with:
| |
| <console># chown -R [user]:[group] [folder]</console>
| |
|
| |
| == gpasswd ==
| |
| You can add user to group with:
| |
| <console># gpasswd -a [user] [group]</console>
| |
| You can remove user from group with:
| |
| <console># gpasswd -d [user] [group]</console>
| |
|
| |
| == useradd ==
| |
| You can add new user with:
| |
| <console># useradd -g users -G wheel,audio,portage -m [user]
| |
| # passwd [user]</console>
| |
| You can delete user with:
| |
| <console># userdel [user]</console>
| |
|
| |
| == groupadd ==
| |
| You can add new group with:
| |
| <console># groupadd [group]</console>
| |
| You can delete group with:
| |
| <console># groupdel [group]</console>
| |
|
| |
| [[Category:HOWTO]]
| |