chmod

Written by Leif Stenfeldt. Posted in Linux, Tips

  • 644 make a file readable by anyone and writable by the owner
    only.
  • go-w deny write permission to group and others.
  • =rw,+X set the read and write permissions to the usual defaults, but retain any execute permissions that are currently set.
  • +X make a directory or file searchable/executable by everyone
    if it is already searchable/executable by anyone.
  • 755
    u=rwx,go=rx
    u=rwx,go=u-w make a file readable/executable by everyone and writable by
    the owner only.
  • go= clear all mode bits for group and others.
  • g=u-w set the group bits equal to the user bits, but clear the
    group write bit.
1267 views

apt-get commands

Written by Leif Stenfeldt. Posted in Linux

Installation commands

  • apt-get install <package_name>

    This command installs a new package.

  • apt-get build-dep <package_name>

    This command searches the repositories and installs the build dependencies for <package_name>. If the package is not in the repositories it will return an error.

  • aptitude install <package_name>

    Aptitude is an Ncurses viewer of packages installed or available. Aptitude can be used from the command line in a similar way to apt-get. See man aptitude for more information.

1198 views

Secure directory (Linux)

Written by Leif Stenfeldt. Posted in Linux, Tips

Follow up by setting up the user authorization within .htaccess file. Copy and paste the following text in:

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /path/to/passwords/.htpasswd
Require valid-user
1290 views