[CentOS] Strange Beauvoir with hard and soft link

Dario Lesca

d.lesca at solinos.it
Wed May 29 16:37:27 UTC 2013


How to is possible this?

> [root at lucatest ~]# ls -lid /var/log /var/log/ispconfig /var/log/ispconfig/httpd /var/log/ispconfig/httpd/prova.it /var/log/ispconfig/httpd/prova.it/test /var/www /var/www/clients /var/www/clients/client1 /var/www/clients/client1/web3 /var/www/clients/client1/web3/log /var/www/clients/client1/web3/log/test
>    706 drwxr-xr-x. 15 root root 4096 29 mag 08:44 /var/log
>  69619 drwxr-xr-x   3 root root 4096  8 mag 18:05 /var/log/ispconfig
>  69620 drwxr-xr-x   6 root root 4096 29 mag 10:54 /var/log/ispconfig/httpd
> 253961 drwxr-xr-x   2 root root 4096 29 mag 12:21 /var/log/ispconfig/httpd/prova.it
> 253984 -rw-r--r--   1 root root    0 29 mag 12:21 /var/log/ispconfig/httpd/prova.it/test
>  44509 drwxr-xr-x. 12 root root 4096 29 mag 10:54 /var/www
>  79376 drwxr-xr-x   4 root root 4096 22 mag 12:57 /var/www/clients
>  87935 drwxr-xr-x   7 root root 4096 29 mag 10:54 /var/www/clients/client1
> 253953 drwxr-xr-x   9 root root 4096 29 mag 10:54 /var/www/clients/client1/web3
> 253961 drwxr-xr-x   2 root root 4096 29 mag 12:21 /var/www/clients/client1/web3/log
> 253984 -rw-r--r--   1 root root    0 29 mag 12:21 /var/www/clients/client1/web3/log/test

See this two folder:

1) /var/log/ispconfig/httpd/prova.it
2) /var/www/clients/client1/web3/log

have the same inode (253953) and none of the parent dirs are symbolic
link (l) but (d), and dir is not possible to generate it with hard link.

If I put a file into first dir, the file there is also into second dir.

See also this two file:

1) /var/log/ispconfig/httpd/prova.it/test
2) /var/www/clients/client1/web3/log/test

these file have same inode 253984 but its not hard or soft link, if I
modify first file also the second file is modified

There is only one filesystem and is the root filesystem.

How to is possible this situation?

Many thanks

-- 
Dario Lesca - sip:dario at solinos.it
(Inviato dal mio Linux Fedora18+Gnome3)





More information about the CentOS mailing list