Tag: restrict access
Restricting access to SFTP / SCP
by Mostafa on Oct.18, 2009, under How To ..., Linux, Software
rssh is a tool that allows SFTP/SCP for file transfers over SSH but denies shell access — useful for preventing users from running commands on the system. More details are available on the tool’s homepage.
I first came across it on this page.
Linux – Disable Shutdown For Normal Users
by Mostafa on Feb.27, 2007, under How To ..., Linux
Very useful for servers/shared machines:
Disable Shutdown For Normal Users
Addendum:
Setting file mode for /etc/acpi/events/power.conf to “0000” is not sufficient to disable the power button. It’s better to:
- Uninstall gnome-power-manager
- Leave file permissions for power.conf unchanged and simply set the action= line to an empty string
It is also advisable to set the local login screen style to plain in gdmsetup.
HTTP Access Control
by Mostafa on Jan.25, 2006, under How To ..., Software
Finally figured out how to password protect individual directories on the server:
Authentication, Authorization and Access Control
It’s a simple 2-step process:
1. Create a passwords file for the users using “htpasswd“:
jsmith@server:~/public_html/db$ htpasswd -c ~/htpasswds jdoe New password: Re-type new password: Adding password for user jdoe jsmith@server:~/public_html/db$
2. Create a file “.htaccess” in the directory to be protected:
jsmith@server:~/public_html/db$ cat .htaccess AuthType Basic AuthName "db" AuthUserFile /home/jsmith/htpasswds Require user jdoe