aliyev's notes

  • About

Posts by admin

Linux file permissions

August 20, 2008, by admin No comments yet

The basics of file ownership and permissions on Linux. Learn to understand who are the owners of a file or directory, how the file permissions work and how you can view them, and learn how to set basic file permissions yourself.

Read more →

How to change a file’s owner and group in Linux

August 20, 2008, by admin No comments yet

< chown – change the owner of a file >

You can change the owner and group of a file or a directory with the chown command. Please, keep in mind you can do this only if you are the root user or the owner of the file.

Set the file’s owner:
$ chown username somefile
After giving this command, the new owner of a file called somefile will be the user username. The file’s group owner will not change. Instead of a user name, you can also give the user’s numeric ID here if you want.
Read more →

Limits for Linux filesystems

August 3, 2008, by admin No comments yet
File System File Size (Bytes) File System Size (Bytes)
Ext2 or Ext3 (1 kB block size) 234 (16 GB) 241 (2 TB)
Ext2 or Ext3 (2 kB block size) 238 (256 GB) 243 (8 TB)
Ext2 or Ext3 (4 kB block size) 241 (2 TB) 243-4096 (16 TB-4096 Bytes)
Ext2 or Ext3 (8 kB block size) (systems with 8 kB pages, like Alpha) 246 (64 TB) 245 (32 TB)
ReiserFS v3 246 (64 TB) 245 (32 TB)
XFS 263 (8 EB) 263 (8 EB)
NFSv2 (client side) 231 (2 GB) 263 (8 EB)
NFSv3 (client side) 263 (8 EB) 263 (8 EB)

vi search

August 3, 2008, by admin No comments yet

In Vi or Vim, use the forward slash </> to search. Then type in your search string and hit <Enter>. You can navigate through occurrences of your search string using <n> to move forward and <N> to move backwards. Below is an example search for the string ‘array’.

Block root access to SSH service

August 3, 2008, by admin No comments yet

SSH (Secure Shell) is a protocol for creating a secure connection between two computers.The secure SSH connection provides authentication and encryption. SSH also provides compression and is most common way for users and root to get connect to the server (Linux), the main reson behind blocking the root user is to allow the admin to login into the box with the default normal user and do the the administrator task using sudo, no direct root login.

1. vi /etc/ssh/sshd_config
3. Locate the parameter — PermitRootLogin yes
4. Change this to PermitRootLogin no
5. Save and exit
6. Restart your sshd by type sudo /etc/init.d/ssh restart

What is 127.0.0.1?

August 3, 2008, by admin No comments yet

127.0.0.1 is the standard IP address used for a loopback network connection.

This means that if you try to connect to 127.0.0.1, you are immediately looped back to your own machine. If you telnet, ftp, etc… to 127.0.0.1, you are connected to your own machine.

In other words, 127.0.0.1 is you.

For example, if your system was named “hostname”, and you attempted to telnet to 127.0.0.1, you would see:

# telnet 127.0.0.1
Trying 127.0.0.1…
Connected to hostname
Escape character is ‘^]’.

Another name for 127.0.0.1 is localhost.

Although 127.0.0.1 is the most commonly utilized address for localhost, any IP address in the 127.*.*.* range should also function in the same manner.

Linux Filesystem Hierarchy

August 3, 2008, by admin No comments yet

Here is a very cool and beautiful representation of the hierarchy which I found @linuxconfig.org site. The diagram below represents (part of) a Linux file system.

HowTo keep your Ubuntu up-to-date

August 3, 2008, by admin No comments yet

It is important to have the system updated, so that we have all the latest patches, security fixes and packages upgrades from the repositories.

First, navigate to: System –> Administration –> Software Sources

and check that all repositories are enabled.

Then, open the terminal: Applications –> Accessories –> Terminal
and type: (you need to provide the password here)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

With this you are done with the system update.

Block Ip Address – Ip Range

August 3, 2008, by admin No comments yet

Surfing the web, I have found usefull link for those who would like to restrict access to a webpage for visitors of a certain country. Here’s a sample for your config file:

<Limit GET HEAD POST>
order allow,deny
deny from 85.94.160.0/19
deny from 91.187.64.0/19
deny from 194.117.123.178/32
deny from 194.158.64.0/19
deny from 195.112.181.196/32
deny from 195.112.181.247/32
allow from all
</LIMIT>

Database for ip addresses can be found here: http://www.find-ip-address.org/

Limiting Access to Websites/Directories with .htaccess

August 3, 2008, by admin No comments yet

This post is not so much a tutorial as my own notes on restricting access with .htaccess files and apache. As has been the case with many of my previous tutorials, the basis is writing the steps down so I can refer to them later. Turns out making notes public on a blog is a good idea. In any event, this will outline restricting access to directories on a user-level with .htaccess.

Create the .htaccess file Read more →

12345

Categories

  • FreePBX
  • IIS
  • Misc
  • Nokia
  • Photoshop
  • Server 2003
  • Server 2008
  • Ubuntu advices
  • Ubuntu troubles
  • Uncategorized
  • vim
  • Windows 2003
  • Wordpress

Recent blog posts

  • Automatically Log off Disconnected User Sessions on Windows admin, September 15, 2020
  • Event ID 20069 – AT_KEYEXCHANGE admin, September 15, 2020
  • SharePoint Online: Adding Term Store Administrators admin, June 10, 2020
  • Sharepoint Online. Get storage use per site using powershell admin, June 8, 2020
  • Extract IP addresses from PCAP admin, May 19, 2020

This is widgetised area:
Footer › Column 1

This is widgetised area:
Footer › Column 2

This is widgetised area:
Footer › Column 3

Copyright © 2020 aliyev. All Rights Reserved. Cookie policy | Privacy policy