LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-09-2008, 10:38 AM   #1
swests
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
Unable to Automount ISO image unless automount is running in foreground!


Hi all

I've been battling this for a week or so and am starting to get really ()&&&$"!(* with it.

What am I trying to do:
Use automount to mount ISO's on demand - kinda like a CD/DVD jukebox. I got the idea from this article http://www.linuxjournal.com/article/5639.

How:
Stick .iso files in a directory (/iso/images/test.iso, etc.)
update autofs files to mount as iso9660, readonly, etc...

Problem:
I get a "permissions denied" message for the .iso image in /var/log/messages when automount is running in the background. It works when automount is run in foreground with -f.

I'm running CentOS 2.6.18-92.el5.

/etc/auto.master contains
/misc /etc/auto.misc
/net -hosts
/isomnt /etc/auto.isomnt --timeout=60
+auto.master

/etc/auto.isomnt contains
xx -fstype=iso9660,ro,loop :/iso/images/test.iso
/var/log/messages shows the generated mount command as
mount -t iso9660 -s -o ro,loop /iso/images.test.iso /isomnt/xx
followed by
>> /iso/images/test.iso: Permission denied



I can't seem to figure out which combination of rights I need and where!

Any ideas?

Thanks

S.
 
Old 07-09-2008, 12:43 PM   #2
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 366

Rep: Reputation: 44
I would mount the ISO images as loopback devices on the server first. Then just share the mounted loopback directory

mount -o loop someimage.iso /ISO1

In /etc/exports
/ISO1


Automounter might be happier this way
 
Old 07-10-2008, 03:56 AM   #3
swests
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
@doublejoon
I could but I'm looking for a solution that will scale as I add more ISO images. The plan is for this box to hold ISOs of my DVD collection and I want then to automount on demand. If I pre-mount then I start to hit kernel resource issues when I really don't need to. In reality, at worst 5 images will be mounted, but this is from a pool of 100's... Hence needing to fix the security issue.
 
Old 07-12-2008, 06:31 AM   #4
Frankly3D
LQ Newbie
 
Registered: Jul 2008
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by swests View Post
@doublejoon
I could but I'm looking for a solution that will scale as I add more ISO images. The plan is for this box to hold ISOs of my DVD collection and I want then to automount on demand. If I pre-mount then I start to hit kernel resource issues when I really don't need to. In reality, at worst 5 images will be mounted, but this is from a pool of 100's... Hence needing to fix the security issue.

The post is old but maybe this maybe the way to go:
http://ubuntu.wordpress.com/2005/10/...unt-iso-files/
 
Old 05-22-2009, 12:47 AM   #5
spiralofhope
LQ Newbie
 
Registered: May 2009
Distribution: Unity Linux
Posts: 4

Rep: Reputation: 0
Lightbulb

I realize this is a response to an ancient thread. However, I had this very same problem and I was able to solve it, but in another way.

I'm on PCLinuxOS 2007/2009 and it has PAM installed. I did this:

Code:
su
ln -s /usr/bin/consolehelper /usr/bin/mount-root
cp /etc/pam.d/synaptic /etc/pam.d/mount-root
ln -s /bin/mount /usr/sbin/mount-root
Then I was able to make a script like so:

Code:
echo mount-root -o loop test.iso /mnt/iso>>isomount.sh
Where "test.iso" is the name of a valid ISO.

I then executed it like so:

Code:
sh ./isomount.sh
I was given a prompt for the password. The mount command worked as-expected.

Of course, I also needed a similar umount command, like so:

Code:
su
ln -s /usr/bin/consolehelper /usr/bin/umount-root
cp /etc/pam.d/synaptic /etc/pam.d/umount-root
ln -s /bin/umount /usr/sbin/umount-root
Perhaps this will help the next person who searches this forum and bumps into this thread.

Last edited by spiralofhope; 05-22-2009 at 12:48 AM.
 
  


Reply

Tags
autofs, automatic, automount, iso, loopback, mount, mounting, pam, permissions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Domain users are unable to automount disk(or flash) AJlekceu Suse/Novell 0 03-23-2007 09:01 AM
running *.iso w/o burning image to the cd/dvd micro_xii Linux - Newbie 2 12-29-2006 02:29 AM
to automount or not.. byte.chaser Debian 8 06-27-2005 03:42 PM
Automount: no more in LE LinxNew Mandriva 2 05-07-2005 09:21 AM
unable to create a bootable cd from iso image abhijit Linux - Newbie 4 09-01-2003 04:16 PM


All times are GMT -5. The time now is 08:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration