[ale] Premission Denied Error

Joe Knapka jknapka at earthlink.net
Thu Aug 31 02:24:20 EDT 2000


> Chris Fowler wrote:
> 
> can anyony tell me what the following system call is failinf with a
> "Permission Denied"?
> 
> mount("/dev/hdc","/mnt","iso9660",MS_RDONLY,NULL);

Try:

mount("/dev/hdc","/mnt","iso9660",MS_MGC_VAL | MS_RDONLY,NULL);

Don't know if that's your problem, but the mount manpage
says you need the magic number if you want the RW flags
to be honored. It could be that the mount syscall is
attempting to mount the filesystem read/write in the
absence of a valid RW flag (though the manpage is unclear
about the default behavior).

-- Joe

> I am loged in as root.  All I want to do is mount /dev/hdc on /mnt as
> read only.  It is a CD.
> I need to do this in C..  I'm sure I made a stupid mistake.
> 
> Thanks,
> Chris

-- 
*** Joseph Knapka ***
In any formula, constants (especially those obtained from handbooks)
are to be treated as variables.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list