How to check inode usage

]# df -i
Filesystem       Inodes    IUsed   IFree IUse% Mounted on
/dev/vda3      50044928 50044928       0  100% /
tmpfs           1950595        1 1950594    1% /dev/shm
/dev/vda1        128016       39  127977    1% /boot
/usr/tmpDSK      262144       20  262124    1% /tmp

for d in *; do echo -n "$d: "; find $d -type f | wc -l; done /home

By the way, if you’re looking for the directories that contain lots of files, this script may help:


#!/bin/bash
# count_em - count files in all subdirectories under current directory.
echo 'echo $(ls -a "$1" | wc -l) $1' >/tmp/count_em_$$
chmod 700 /tmp/count_em_$$
find . -mount -type d -print0 | xargs -0 -n1 /tmp/count_em_$$ | sort -n
rm -f /tmp/count_em_$$

Also…

# find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n

Try to find if this is an inodes problem with:


# df -ih

Try to find root folders with large inodes count:


# for i in /*; do echo $i; find $i |wc -l; done

Try to find specific folders:


# for i in /src/*; do echo $i; find $i |wc -l; done

Hi,

while re configuring a domain in plesk windows then solution is below:

1. Start> Run > cmd>

2.C:\net user geeksupp /add

3. C:\net localgroup psacln geeksupp /add

4. servermanager > configuration > Local users and Groups > user > properties > Add Local Path  to “C:\inetpub\vhosts\geek4support.com”.

Replace your username and domainname.

Here is how to install the mailman mailing list on CentOS 6.6.
Install Mailman via yum:


# yum install mailman

Next, edit its Apache configuration file:

# cd /etc/httpd/conf.d
# vi mailman.conf
RedirectMatch ^/mailman[/]*$ http://domain.com/mailman/listinfo

Uncomment the redirect parameter and enter the correct domain name.
Set the site master password:

# /usr/lib/mailman/bin/mmsitepass password

This password can be used to access any list or any page. Edit the Mailman configuration file:


# vi /usr/lib/mailman/Mailman/mm_cfg.py
DEFAULT_URL_HOST = ‘domain.com’
DEFAULT_EMAIL_HOST = ‘domain.com’

The URL host parameter usually matches the domain name from the above Apache configuration file. The email host should match the origin of the mail (i.e. the part after the @ of the email address, whether it is host.domain.com or domain.com).
Check for updates:


# cd /usr/lib/mailman
# bin/update
Upgrading from version 0x0 to 0x2010cf0
getting rid of old source files
no lists == nothing to do, exiting


If you get this error:

# bin/update
Traceback (most recent call last):
  File "bin/update", line 48, in <module>
    from Mailman import mm_cfg
  File "/usr/lib/mailman/Mailman/mm_cfg.py", line 86, in <module>
    DEFAULT_URL_HOST   = coldriverdata.com
NameError: name 'coldriverdata' is not defined

Check that the format is correct with the domains

# vi /usr/lib/mailman/Mailman/mm_cfg.py
DEFAULT_URL_HOST = ‘domain.com’
DEFAULT_EMAIL_HOST = ‘domain.com’

* Notice the “‘”

Create the mailman site list and set up the aliases:


> cd /usr/lib/mailman
> bin/newlist mailman


Enter the email of the person running the list: minh@minhtech.com
Initial mailman password: password
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases’ program:

## mailman mailing list
mailman: “|/usr/lib/mailman/mail/mailman post mailman”
mailman-admin: “|/usr/lib/mailman/mail/mailman admin mailman”
mailman-bounces: “|/usr/lib/mailman/mail/mailman bounces mailman”
mailman-confirm: “|/usr/lib/mailman/mail/mailman confirm mailman”
mailman-join: “|/usr/lib/mailman/mail/mailman join mailman”
mailman-leave: “|/usr/lib/mailman/mail/mailman leave mailman”
mailman-owner: “|/usr/lib/mailman/mail/mailman owner mailman”
mailman-request: “|/usr/lib/mailman/mail/mailman request mailman”
mailman-subscribe: “|/usr/lib/mailman/mail/mailman subscribe mailman”
mailman-unsubscribe: “|/usr/lib/mailman/mail/mailman unsubscribe mailman”

Hit enter to notify mailman owner…


> vi /etc/aliases
## mailman mailing list
mailman: “|/usr/lib/mailman/mail/mailman post mailman”
mailman-admin: “|/usr/lib/mailman/mail/mailman admin mailman”
mailman-bounces: “|/usr/lib/mailman/mail/mailman bounces mailman”
mailman-confirm: “|/usr/lib/mailman/mail/mailman confirm mailman”
mailman-join: “|/usr/lib/mailman/mail/mailman join mailman”
mailman-leave: “|/usr/lib/mailman/mail/mailman leave mailman”
mailman-owner: “|/usr/lib/mailman/mail/mailman owner mailman”
mailman-request: “|/usr/lib/mailman/mail/mailman request mailman”
mailman-subscribe: “|/usr/lib/mailman/mail/mailman subscribe mailman”
mailman-unsubscribe: “|/usr/lib/mailman/mail/mailman unsubscribe mailman”


# newaliases

After creating the list, add the listed aliases to the bottom of the aliases file, and then run newaliases.
Finally, restart Apache and start mailman:


# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

# /etc/init.d/mailman start
Starting mailman: [ OK ]


# chkconfig –level 2345 mailman on

In a typical UNIX/LINUX-style file listing, a file will be displayed in the following way:

ls -l index.php

Output:

-rw-r--r--. 1 www-data www-data 405 Nov 14 01:45 index.php

The first character indicates the file type. It can be a regular file (-), directory (d), a symbolic link (l), or other special types of files. The following nine characters represent the file permissions, three triplets of three characters each. The first triplet shows the owner permissions, the second one group permissions, and the last triplet shows everybody else permissions.

-rw-r--r--.

r stands for read permission;
w stands for write permission;
x stands for execute permission.

The permissions are divided into three parts.

The first three characters after the initial – are (rw-) are for Owner permissions. The owner of the file, the user “www-data”, can read the file and write (modify) it.

The next three characters (r–) are for group permissions. Members of the group “www-data” can read the file.

The last three characters (r–) are for other (world) permissions. These are the permissions for everyone else on the system. Users other than “group” who are not members of the “www-data” group can only read the file.

For directories, the permissions have a slightly different meaning.

For example:

ls -la
drwxr-xr-x  8 www-data www-data  4096 Feb 21 11:28 wp-content

Read determines if the user can get a list of the files in the directory;

Write determines if the user can create or delete files in the directory. A point of interest in this case is that if a user has write access to the directory, the user can delete files that are in that directory even if the username has no write permissions for the particular files;

Execute determines if the user can cd into the directory.

To summarize:

In this case, the owner, user, can do just about anything in the directory. Members of the group staff can list the contents of the directory and browse it. No one else is allowed access to the directory. Permissions are also often represented by digits. For example, 755 is the same as

-rwxr-xr-x.

The permission bits correspond to a certain number: 4 stands for r, 2 for w, 1 for x.

The reason for this is that in binary 100 (r–) is 4 in decimal; 10 (or 010, -w-) in binary is 2; and 1 (or 001, –x) in binary is 1 in decimal.

This allows for adding the numbers together, which can give a number from 0 to 7 for each of the three parts of the permissions set.

Here is a nice grid.

-rw-r--r-- 8 www-data www-data 12.0K Apr  28 10:10 file_name
|[-][-][-]-   [------] [---]
| |  |  | |      |       |
| |  |  | |      |       +-----------> 7. Group
| |  |  | |      +-------------------> 6. Owner
| |  |  | +--------------------------> 5. Alternate Access Method
| |  |  +----------------------------> 4. Others Permissions
| |  +-------------------------------> 3. Group Permissions
| +----------------------------------> 2. Owner Permissions
+------------------------------------> 1. File Type