Sponsored Content
Full Discussion: Hard links for directories.
Top Forums UNIX for Advanced & Expert Users Hard links for directories. Post 302447569 by Corona688 on Monday 23rd of August 2010 02:45:38 PM
Old 08-23-2010
I haven't yet found any modern UNIX that permits hard links for directories, ever. I believe this was for security reasons, though I never totally understood that explanation. This may depend on the filesystem as well as the kernel, too.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

links: (soft, hard? symbolic??) inode

Hi, what is link? and soft link? how about hard one and symbolic link. and inode. i get confuse about this links. could anyone help me with full explainsion? thks Gusla (5 Replies)
Discussion started by: gusla
5 Replies

2. UNIX for Dummies Questions & Answers

links.... soft or hard.. not sure?

hi, i am in a directory, have 2 files as below then do a ls -l gives the below lrwxrwxrwx 1 root system 23 Mar 08 2001 filea -> /adir/filea lrwxrwxrwx 1 root system 23 Mar 08 2001 filea -> /adir/fileb now, when i do a cd /adir, the system said, adir not... (5 Replies)
Discussion started by: yls177
5 Replies

3. UNIX for Dummies Questions & Answers

hard links in unix

hi i have a hardlink how can i find the source of it (2 Replies)
Discussion started by: jpriyank
2 Replies

4. UNIX for Dummies Questions & Answers

Deleting Symbolic and/or Hard links

From what I understand a symbolic link is alot like a shortcut where it points to another file. if the original file is deleted the symbolic link is rendered useless but a symbolic link can be deleted without any problem. A hard link is like a copy of the file itself but pointing to the same... (3 Replies)
Discussion started by: cue
3 Replies

5. Shell Programming and Scripting

Unable to preserve hard links. Why?

Hi, I'm trying to create a Makefile that would automate remastering Knoppix distribution. As a part of the process I am mounting using linux cloop device a compressed filesystem and copy the content out of it to separate dir. However during that process I need to preserve hard links and it... (9 Replies)
Discussion started by: dpc.ucore.info
9 Replies

6. Shell Programming and Scripting

Hard Links Help

Ksh newbie here, so please bear with me. I'm currently writing a script that searches through a directory and displays files with multiple hard links. The way I have it set up, is that it displays the i-node number and then each of the link names. In addition to this, I need to know if there... (7 Replies)
Discussion started by: Unknown50862
7 Replies

7. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

8. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

9. UNIX for Dummies Questions & Answers

Simple example for soft and hard links

Hai, give me a simple example for soft and hard links. this will work for soft link ?? ln -s (2 Replies)
Discussion started by: Ramesh M
2 Replies

10. Shell Programming and Scripting

Timestamp change for hard and soft links

Hi team, i am writing a purge script to delete softlinks and hardlinks on linux system which are 3/10/30 days old. To test the script i need to create links with old timestamp, i am able to cange timestamp for files but not for links. i tried touch -h option but this option is not available on... (1 Reply)
Discussion started by: Satyak
1 Replies
ATTR(5) 							File Formats Manual							   ATTR(5)

NAME
attr - Extended attributes DESCRIPTION
Extended attributes are name:value pairs associated permanently with files and directories, similar to the environment strings associated with a process. An attribute may be defined or undefined. If it is defined, its value may be empty or non-empty. Extended attributes are extensions to the normal attributes which are associated with all inodes in the system (i.e. the stat(2) data). They are often used to provide additional functionality to a filesystem - for example, additional security features such as Access Control Lists (ACLs) may be implemented using extended attributes. Users with search access to a file or directory may retrieve a list of attribute names defined for that file or directory. Extended attributes are accessed as atomic objects. Reading retrieves the whole value of an attribute and stores it in a buffer. Writing replaces any previous value with the new value. Space consumed for extended attributes is counted towards the disk quotas of the file owner and file group. Currently, support for extended attributes is implemented on Linux by the ext2, ext3, ext4, XFS, JFS and reiserfs filesystems. EXTENDED ATTRIBUTE NAMESPACES
Attribute names are zero-terminated strings. The attribute name is always specified in the fully qualified namespace.attribute form, eg. user.mime_type, trusted.md5sum, system.posix_acl_access, or security.selinux. The namespace mechanism is used to define different classes of extended attributes. These different classes exist for several reasons, e.g. the permissions and capabilities required for manipulating extended attributes of one namespace may differ to another. Currently the security, system, trusted, and user extended attribute classes are defined as described below. Additional classes may be added in the future. Extended security attributes The security attribute namespace is used by kernel security modules, such as Security Enhanced Linux. Read and write access permissions to security attributes depend on the policy implemented for each security attribute by the security module. When no security module is loaded, all processes have read access to extended security attributes, and write access is limited to processes that have the CAP_SYS_ADMIN capability. Extended system attributes Extended system attributes are used by the kernel to store system objects such as Access Control Lists and Capabilities. Read and write access permissions to system attributes depend on the policy implemented for each system attribute implemented by filesystems in the ker- nel. Trusted extended attributes Trusted extended attributes are visible and accessible only to processes that have the CAP_SYS_ADMIN capability (the super user usually has this capability). Attributes in this class are used to implement mechanisms in user space (i.e., outside the kernel) which keep informa- tion in extended attributes to which ordinary processes should not have access. Extended user attributes Extended user attributes may be assigned to files and directories for storing arbitrary additional information such as the mime type, char- acter set or encoding of a file. The access permissions for user attributes are defined by the file permission bits. The file permission bits of regular files and directories are interpreted differently from the file permission bits of special files and symbolic links. For regular files and directories the file permission bits define access to the file's contents, while for device special files they define access to the device described by the special file. The file permissions of symbolic links are not used in access checks. These differences would allow users to consume filesystem resources in a way not controllable by disk quotas for group or world writable special files and directories. For this reason, extended user attributes are only allowed for regular files and directories, and access to extended user attributes is restricted to the owner and to users with appropriate capabilities for directories with the sticky bit set (see the chmod(1) manual page for an explanation of Sticky Directories). FILESYSTEM DIFFERENCES
The kernel and the filesystem may place limits on the maximum number and size of extended attributes that can be associated with a file. Some file systems, such as ext2/3 and reiserfs, require the filesystem to be mounted with the user_xattr mount option in order for extended user attributes to be used. In the current ext2, ext3 and ext4 filesystem implementations, each extended attribute must fit on a single filesystem block (1024, 2048 or 4096 bytes, depending on the block size specified when the filesystem was created). In the XFS and reiserfs filesystem implementations, there is no practical limit on the number or size of extended attributes associated with a file, and the algorithms used to store extended attribute information on disk are scalable. In the JFS filesystem implementation, names can be up to 255 bytes and values up to 65,535 bytes. ADDITIONAL NOTES
Since the filesystems on which extended attributes are stored might also be used on architectures with a different byte order and machine word size, care should be taken to store attribute values in an architecture independent format. AUTHORS
Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS development team, <linux-xfs@oss.sgi.com>. SEE ALSO
getfattr(1), setfattr(1). ATTR(5)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy