]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
Docs: Setup directories with correct permissions
authorVagisha Gupta <vagishagupta23@gmail.com>
Wed, 12 Jun 2019 08:21:24 +0000 (13:51 +0530)
committerShivani Bhardwaj <shivanib134@gmail.com>
Sun, 22 Dec 2019 17:25:38 +0000 (22:55 +0530)
Documentation updated with the steps to setup the directories with
the correct permissions.

doc/quickstart.rst

index 2489a3cfa3269152a2fd6a3423a82adfacc902c0..c6a3bfb9940e9f2d63cdf71c8a863b7fe28c5392 100644 (file)
@@ -40,7 +40,7 @@ Directories and Permissions
 In order for ``suricata-update`` to function, the following
 permissions are required:
 
-* Directory /etc/suricata: read access
+* Directory /etc/suricata: read/write access
 * Directory /var/lib/suricata/rules: read/write access
 * Directory /var/lib/suricata/update: read/write access
 
@@ -48,12 +48,47 @@ One option is to simply run ``suricata-update`` as root or with
 ``sudo``.
 
 .. note:: It is recommended to create a ``suricata`` group and setup
-          the above directories with the correction permissions for
+          the above directories with the correct permissions for
           the ``suricata`` group then add users to the ``suricata``
           group.
 
-         More documentation will be provided about this, including a
-         tool to verify and maybe setup the permissions.
+Steps to setup the above directories with the correct permissions:
+
+First, create a group ``suricata``::
+
+    sudo groupadd suricata
+
+Next, change the group of the directories and its files recursively::
+
+    sudo chgrp -R suricata /etc/suricata
+    sudo chgrp -R suricata /var/lib/suricata/rules
+    sudo chgrp -R suricata /var/lib/suricata/update
+
+.. note:: The paths ``/etc/suricata`` and ``/var/lib`` above are used
+          in the default configuration and are dependent on paths set
+          during compilation. By default, these paths are set to
+          ``/usr/local``.
+          Please check your configuration for appropriate paths.
+
+Setup the directories with the correct permissions for the ``suricata``
+group::
+
+    sudo chmod -R g+r /etc/suricata/
+    sudo chmod -R g+rw /var/lib/suricata/rules
+    sudo chmod -R g+rw /var/lib/suricata/update
+
+Now, add user to the group::
+
+    sudo usermod -a -G suricata username
+
+Verify whether group has been changed::
+
+    ls -al /etc/suricata
+    ls -al /var/lib/suricata/rules
+    ls -al /var/lib/suricata/update
+
+Reboot your system. Run ``suricata-update`` without a sudo to check
+if suricata-update functions.
 
 Update Your Rules
 =================