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

(Difference between pages)
 
 
Line 1: Line 1:
== Add user ==
+
== Example and Usage ==
<console>
+
Example:
###i## 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 }}
###i## userder -r <username>
+
</console>
+
  
== List groups ==
+
== See also ==
$##bl## groups
+
* [[Template:Fancywarning]]
$##bl## groups <username>
+
* [[Template:Fancytip]]
 
+
* [[Template:Fancyimportant]]
== List users ==
+
$##bl## users
+
 
+
== Add user to group ==
+
###i## gpasswd -a <user> <group>
+
 
+
== Remove user from group ==
+
###i## gpasswd -d <user> <group>
+
 
+
== Add new group ==
+
###i## groupadd <group>
+
 
+
== Delete group ==
+
###i## groupdel <group>
+
 
+
== File permissions ==
+
You can change file permissions with chmod.
+
<console>
+
$##bl## 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>
+
###i## chown <user>:<group> <file>
+
</console>
+
You can change owner of folder and files inside recursively with:
+
<console>
+
###i## 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