Root Login Email alert
2. cd /root
3. vi .bashrc
4. Scroll to the end of the file then add the following:
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert:
Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" you@yourdomain.com
Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address
Friday, February 15, 2013
Special permissions on files and directories: SetUID, SetGID and Sticky bit.
Special Permissions
Special Permissions | on a File | on a Directory |
---|---|---|
SUID or Set User ID | A program is executed with the file owner's permissions (rather than with the permissions of the user who executes it). | Files created in the directory inherit its UID. |
SGID or Set Group ID | The effective group of an executing program is the file owner group. | Files created in the directory inherit its GID. |
Sticky (bit) | A program sticks in memory after execution. | Any user can create files, but only the owner of a file can delete it. |
Permissions | Meaning |
---|---|
--S------ | SUID is set, but user (owner) execute is not set. |
--s------ | SUID and user execute are both set. |
-----S--- | SGID is set, but group execute is not set. |
-----s--- | SGID and group execute are both set. |
--------T | Sticky bit is set, bot other execute is not set. |
--------t | Sticky bit and other execute are both set. |
Thursday, February 14, 2013
Disabling Mod-Security for a single account
Disabling Mod-Security for a single account
To disable the mod_security for a particular account, just add the following in the users .htaccess file
SecFilterEngine Off
SecFilterScanPOST Off
To disable the mod_security for a particular account, just add the following in the users .htaccess file
SecFilterEngine Off
SecFilterScanPOST Off
Subscribe to:
Posts (Atom)