User Tools

Site Tools


nix:permissions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
nix:permissions [2014/12/01 10:29] kauffmannix:permissions [2017/09/15 17:02] – [I have a directory structure full of files and I want to ensure no one else can read them] kauffman
Line 1: Line 1:
 ====== Permissions ====== ====== Permissions ======
 Here is a very good article on unix permissions ((http://www.grymoire.com/Unix/Permissions.html)). Here is a very good article on unix permissions ((http://www.grymoire.com/Unix/Permissions.html)).
 +
 +
 +===== Securing a directory =====
 +You're here because you heard that this would a good idea. There are going to be many ways to ensure a directory is 'secure', but that will depend on your requirements.
 +
 +I will assume that you are the only person that will need access to said directory. I also will not try to explain unix permissions to you. If you want to know more I suggest you read the link at the top of this page. Follow along below to create a directory that only you will be able to access.
 +
 +Given a directory ''%%foo%%'' we can do the following:
 +<code>
 +chown $USER:$USER foo
 +</code>
 +$USER will translate to your username, but we recommend you actually type out your username.
 +This will set the user and the group to $USER.
 +
 +
 +Now make sure that only the user field can has access to the directory.
 +<code>
 +chmod 700 foo
 +</code>
 +
 +
 +==== I have a directory structure full of files and I want to ensure no one else can read them ====
 +I got your back.
 +
 +<code>
 +chmod -R go-rwx foo
 +
 +  -R: recursive. 
 +  g: select group permission
 +  o: select other permission
 +  -: remove
 +  r: read permission
 +  w: write permission
 +  x: execute permission 
 +</code>
 +We are asking ''%%chmod%%'' to remove read, write, and execute permissions on the group and other permission fields.
 +
 +
/var/lib/dokuwiki/data/pages/nix/permissions.txt · Last modified: 2017/09/15 17:03 by kauffman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki