Read the following thoroughly to understand why
The following is quoted from here
Quote:
Most Linux and Unix file systems don't allow hard links to directories (except for the . and .. entries that mkdir creates itself). The reasons are are pretty obvious: you could really confuse programs like ls (ls -R), find and of course fsck if you created links that recursed back to themselves.
If there was a compelling reason to allow directory hard links, you'd need to rewrite any program that wants to walk a file system tree to be aware of the possible problems..
So instead we have symlinks
So instead we have symlinks. You've probably used them for things like shifting around disk space or to give more convenient access to a directory. For example, Mac OS X creates /tmp as a symbolic link to "private/tmp". We use symlinks to make other directories visible under Apache's htdocs directory (though the same thing can be accomplished with Apache's configuration files).
One problem with symbolic links is that really they are just files. A special kind of file, yes, but a symlink only points at a directory - it doesn't act like one. So, for example, if you put a symlink to /xyz in a users home directory, and the user has write permission to his home (as he ordinarily would), he can remove your symlink. Nothing you can do with ordinary permissions can prevent that. You can do a "chattr +i" on your symlink, but because it is a symlink, that passes through to the actual directory, making it unusable. If you use "+u" (undeletable), that again passes through, and the user still can delete your symlink.
This can be extremely annoying, especially when users accidentally delete a symlink they need to have. Of course your real directory is still safe, but you need to recreate the symlink. In the mean time, your user is confused or maybe even broken.
There is at least one way around this. If the thing you want to link to is a mounted file system, you can use the "--bind" option of mount to create an unbreakable link.
If the thing to link to it isn't a separate fs, you can almost always make it be one.
Here's how it works. Let's say we have /dev/foo mounted at /foo and I want a "link" to that under /home/fred. All I have to do is:
Fred can have full write permissions on /foo if he needs it, but he will not be able to remove /home/fred/foo. Not even root can:
This User Gave Thanks to h@foorsa.biz For This Post:
How to create a new mount point with 600GB and add 350 GBexisting mount point
Best if there step that i can follow or execute before i mount or add diskspace IN AIX
Thanks (2 Replies)
Hi All
I need to do bind of exiting filesystem to new storage allocated
mount --bind /prod/OpenCSS /var/lib/test
echo "/prod/OpenCSS /var/lib/pgsql bind bind 0 0" >> /etc/fstab
will this command just work ? (2 Replies)
Hi ALL
I am unable to do mount bind to connect new storage
Once I run the below commands both file systems were empty
Code:
mount --bind /prod/OpenCSS /var/lib/test
Code:
echo "/prod/OpenCSS /var/lib/pgsql bind bind 0 0" >> /etc/fstab
Please use code tags for code and data (9 Replies)
I have a sftp server running on Centos 5.10. It servers as upload/download interface for three users who basically are chrooted to three different locations.
User A -- > /home/REGIONA/
User B -- > /home/REGIONB/
User C -- > /home/REGIONC/
The users run certain application procedures on... (4 Replies)
Hi All,
we have an issue in bind mounting LINUX.
we are able to see the bound mounts in mount command and
df -h <file system name> but they are not visible in normal df -h command.
all these mounts are local mounts.
we have a /xyz is mount and abc is a directory in /xyz ( /xyz/abc )
... (1 Reply)
Heyas
At home i have 1 nas with 3 shares, of which i used to mount 2 of them using a script with hardcoded password and username in it.
EDIT: Turns out, its not the script, but 'how i access' the nas share.. (-o user=XY,password=... VS. -o credentials=...).
Figured about credential files,... (0 Replies)
When you get the message can't bind to ip already in use.
is there a command to search to see everything that is using that IP?
I've already check the host and hostname files (2 Replies)
Hello,
I have a few Ubuntu 9.10 laptops I'm trying to learn NFS sharing with. I am just experimenting on this right now, so no harsh words about the security of what I'm playing with, please ;)
Below are the configs
/etc/exports on host
/home/woodnt/Homeschool... (2 Replies)
I am having trouble mounting with cifs, but mounting the exact same command with smbfs works fine. The share is on another samba server and is set to full public guest access. # mount -t cifs //servername/sharename /mnt/temp -o password=""
mount error 13 = Permission denied Refer to the... (3 Replies)
Hi...
question is this:
How do I mount an LVD hotswap scsi drive in bay #2 on a netra using the mount command? volmgt doesn't seem to mount it and/or I don't know how to view the drives data if it's formatted which it may not be. This drive is not new out of the box so I'm not sure.
... (4 Replies)