mountpoint and ability to write files to mountpoint

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ravi Parimi
Date:  
Subject: mountpoint and ability to write files to mountpoint
> When a mount point is created at say /sdb and then mounted and a file is
>     copied to /sdb it is going to be put on the device that is mounted to
> /sdb
> What if it is not mounted yet and then when the copy is made it is just
> being copined to a local folder on the hard drive and not the
> optical-magneto drive that /sdb actually refers to


> How can one make a mountpoint where they can only write to it when it is
> mounted, is it just a permissions issue?


Most of the times it is a permission issue. By mounting a filesystem onto
/sdb with the correct parameters(this depends on the type of filesystem
you are trying to mount - NFS, samba, iso9660, ext3 etc..) you can make
sure that it is only writeable when a filesystem is mounted and not
writeable at other times. Each fs has its own set of parameters that let
you control the permissions on mounting..


> Also how can I check what is really on the optical magneto disk? I can
> do a ls on /sdb when it is mounted although is there another way to do
> this, I just do not want mixups with thinking that the files that ls is
> reporting on are on the optical-magneto disk while in reality they are
> just in the folder /sdb on the local hard drive


Not sure if and optical magneto disk is just a plain CDROM..But you can
issue the mount or df command to check if your disk is actually mounted.
Once you do that, the output of ls will be less ambiguous...

Hope that helps,
--ravi