Secure GET

Secure GET

Following steps will allow only selected users in particular group to run GET command on the server :

Step 1:- Create a group on the server


]# groupadd getgrp

Step 2:- Give execute permission to group


]# chmod 750 /usr/bin/GET

Step 3:- Add this group to GET file.


]# chown root.getgrp /usr/bin/GET

Step 4:- To check the permission of GET


]# ll -ld /usr/bin/GET

Step 5:- Now if you need to add the user to getgrp so that he gets execute permission on GET. Also getgrp should be secondary group of that user. Let the user be myuser1.


]# gpasswd -M myuser1 getgrp

Step 6:- To check if the user is added


]# cat /etc/group | grep getgrp

Step 7:- But if you want to add another user say myuser2 then please make sure that you mention both the user in your command as :


]# gpasswd -M myuser1,myuser2 getgrp

If you don’t mention both the user, this command will replace all the users with the user mentioned in your command. You should always run the cat command before adding any user so that you know how many users are already added. Or you can just edit the /etc/group file and add the user in the getgrp line.

The above steps will allow only root, myuser1 and myuser2 to execute GET command, all other will be denied.

Please note that path to GET may vary with the OS.

If your site needs secure, high-performance hosting, visit our homepage to see our range of web hosting solutions.


Pin It on Pinterest

Share This