Difference between pages "File permissions" and "Template:Trim"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
(Added a template to support Template:Package. Inspired and adapted from a similar template done by the folks over at Gentoo wiki.)
 
Line 1: Line 1:
== chmod ==
+
<includeonly>{{#if: {{{1|}}}|{{ {{{|safesubst:}}}#if:1|{{{1|}}}}}|{{Error|Trim|unnamed}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
You can change file permissions with:
+
<console>
+
$##bl## 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>
+
###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>
+
 
+
== gpasswd ==
+
You can add user to group with:
+
<console>
+
###i## gpasswd -a [user] [group]
+
</console>
+
You can remove a user from a group with:
+
<console>
+
###i## gpasswd -d [user] [group]
+
</console>
+
 
+
== useradd ==
+
You can add a new user with:
+
<console>
+
###i## useradd -g users -G wheel,audio,portage -m [user]
+
###i## passwd [user]
+
</console>
+
You can delete a user with:
+
<console>
+
###i## userdel [user]
+
</console>
+
 
+
== groupadd ==
+
You can add a new group with:
+
<console>
+
###i## groupadd [group]
+
</console>
+
You can delete a group with:
+
<console>
+
###i## groupdel [group]
+
</console>
+
 
+
[[Category:HOWTO]]
+

Latest revision as of 23:28, 10 January 2014

[create]

Template-info.png Template Documentation

To use this template insert {{Template:Trim}} into the page you wish to use it on and the page you wish.

This template does not have documentation, please add it