Difference between pages "File permissions" and "Template:Fancynote/Doc"

(Difference between pages)
 
 
Line 1: Line 1:
== Add user ==
+
== Example and Usage ==
<console>
+
Example:
# useradd -g users -G wheel,portage,audio,video,usb,cdrom,tty -m <username>
+
<pre>
</console>
+
{{Fancynote| Note }}
 +
</pre>
  
== Delete user ==
+
Will produce:
<console>
+
{{Fancynote| Note }}
# userder -r <username>
+
</console>
+
  
== List groups ==
+
== See also ==
<console>
+
* [[Template:Fancywarning]]
$ groups
+
* [[Template:Fancytip]]
$ groups <username>
+
* [[Template:Fancyimportant]]
</console>
+
 
+
== List users ==
+
<console>
+
$ users
+
</console>
+
 
+
== Add user to group ==
+
<console>
+
# gpasswd -a <user> <group>
+
</console>
+
 
+
== Remove user from group ==
+
<console>
+
# gpasswd -d <user> <group>
+
</console>
+
 
+
== Add new group ==
+
<console>
+
# groupadd <group>
+
</console>
+
 
+
== Delete group ==
+
<console>
+
# groupdel <group>
+
</console>
+
 
+
== File permissions ==
+
You can change file permissions with chmod.
+
<console>
+
$ chmod <r><g><u> <file>
+
</console>
+
<r> = number for root permissions
+
<g> = number for group permissions
+
<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>
+
 
+
== Change owner and group of file ==
+
You can change owner and group of file with chown.
+
<console>
+
# chown <user>:<group> <file>
+
</console>
+
You can change owner of folder and files inside recursively with:
+
<console>
+
# chown -R <user>:<group> <folder>
+
</console>
+
 
+
[[Category:HOWTO]]
+
[[Category:First Steps]]
+

Latest revision as of 21:18, September 25, 2014

Example and Usage

Example:

{{Fancynote| Note }}

Will produce:

Note

Note 

See also