LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting a "special device", Read Only (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-a-special-device-read-only-362327/)

hanasi 09-11-2005 08:41 AM

Mounting a "special device", Read Only
 
I have Linux running on a machine on which eComStation is also installed. I wish to designate one partition of the eComStation installation for data transfer between the two OSes. At the moment I want the transfer to be in one direction only, so I want to mount the transfer partition witout write permission for anyone, including the superuser.

Mounting the partition in Linux is no problem:
<mount -t hpfs /dev/sda12 /home/stan/importdata>.

But the default is to mount with write permission, which I don't want. As I read the man page for mount, I should be able to alter this by adding the r option behind the -t:
<mount -tr hpfs /dev/sda12 /home/stan/importdata>.

But this gets me a referral back to the man page, so clearly I am misunderstanding, although it seems simple enough. What is it that I am misunderstanding?

david_ross 09-11-2005 08:45 AM

You should be able to mount it with the ro (read only) option - just add "-o ro" to your mount command or "ro" to the options column of /etc/fstab

acid_kewpie 09-11-2005 08:51 AM

you would need to specify the -r seperately from the -t as the -t needs to know that hpfs parameter. personally i would say use "-o ro" with is passing a standard "read only" flag as an option. as far as your syntax

hanasi 09-11-2005 08:55 AM

Quote:

Originally posted by david_ross
You should be able to mount it with the ro (read only) option - just add "-o ro" to your mount command or "ro" to the options column of /etc/fstab

Interesting. The man page says merely that "-o ro" is a synonym for "-r", implying that the latter is at least as valid as the other. I'll try your suggestion, for which many thanks.

acid_kewpie 09-11-2005 09:03 AM

i think david missed what i originally missed, in that you can't combine the two options togheter as in is parameterised

hanasi 09-11-2005 09:06 AM

Quote:

Originally posted by acid_kewpie
you would need to specify the -r seperately from the -t as the -t needs to know that hpfs parameter. personally i would say use "-o ro" with is passing a standard "read only" flag as an option. as far as your syntax
Ach!! Very clear. I should have seen that the way I had it broke the association between the "t" and its argument.


All times are GMT -5. The time now is 12:59 AM.