Results 1 to 9 of 9
Hello. I'm sure this question has been asked often, but I haven't been able to find a satisfactory answer.
I want to be able to loop-mount .iso files (and other ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-26-2011 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
Mount .iso files (and other stuff) as non root
Hello. I'm sure this question has been asked often, but I haven't been able to find a satisfactory answer.
I want to be able to loop-mount .iso files (and other stuff) as my normal (non-root) user. But when I try to do it (command: "mount -o loop my-file.iso /media/iso"), I get the fateful "mount: only root can do that" message.
Anyone knows how to skip this pickyness of the mount command? But, to save your time and mine, before replying please keep in mind that:
1.- I don't want to use sudo every time. It's slow and annoying.
2.- Logically, I can't be editing /etc/fstab for every new .iso file I want to mount.
3.- I don't want to use any gui program. I want to mount in a console.
4.- I've tried to make /bin/mount suid root, but it doesn't work
5.- I've tried to edit the /etc/sudoers file (user ALL = NOPASSWD: /bin/mount), but it doesn't work.
If possible, I'd love to be able to mount ANYTHING as a normal user, not just an .iso file.
Thank you.Last edited by zogoibi; 05-26-2011 at 09:17 PM.
- 05-28-2011 #2Just Joined!
- Join Date
- Mar 2009
- Posts
- 92
well u r moving on the correct line
try using
$sudo su
(su changes user id and makes or makes u a super user)
$cd /mnt/iso
(creates the folder where u want to mount the ISO)
$mount -o loop myfile.iso /mnt/ISO
(mounts the ISO to specifies destination)
- 12-29-2011 #3Just Joined!
- Join Date
- Dec 2011
- Posts
- 2
- 12-29-2011 #4Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
Antonio: thanks, but remember my point #1.

I know I can su, I know I can sudo; I can all the same login as root and disregard a normal user. But what I want to do (supposing it's possible) is much, much simpler: I want to mount something as a simple user. Why can't I?
Very often, I really, really fail to understand the programmers' minds. I can find no strong reason whatsoever to ban a normal user from mounting an .iso file, or whatever. Why on earth is the mount command so supercilious? That frustrates me.
Jaleks: Thanks. fuseiso works great.
And, yet... it's not quite the same.
- 12-30-2011 #5Just Joined!
- Join Date
- Dec 2011
- Posts
- 2
I can't neither. I think they are afraid of having users mount an .iso on /var or something - but where would be the problem of checking write permissions, or forcing mounting below the home directory only, for ordinary users. *sigh* In which language mount was written then? Perhaps we should release a patch...
- 12-30-2011 #6
An injudicious mount could bork your system. It's a way of making your accept responsibility for doing so
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn
- 12-30-2011 #7
Allowing anyone to mount anything can also cause security issues.
If you, a regular user, can mount anything you like, then you can introduce outside software to the system. Or you could easily copy files or documents and smuggle them out.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 12-30-2011 #8Just Joined!
- Join Date
- Jul 2009
- Posts
- 15
If only I knew how to make a patch!!

Anyhow, very likely there are options in the Makefile for compiling the program so as to be more permissive, don't you think so?
*Sigh*
This is a very old story: usability versus security. Of course linux "gurus" tend to support programmers' choices. But in a quick google search, I've just found approximately 500 threads addressing the problem. We're facing no small issue.
IMHO, none of the two argued reasons are strong enough to ban a normal user from such an essential function as mounting an iso image, or the like. This is not Windows. Linux users are supposed to know a bit better what they're doing; at least, those who ever open a console. If they're knowledgable enough to use a console, and to su, then they're dangerous enough to injure their systems in one thousand ways, for example "rm -rf /". However, according to your reasoning, we should perhaps ban a normal user from suing or even sudoing: an injudicious su can "bork" your system and cause security issues. If a root user can mount whatever he wants, he can also introduce outside software and smuggle out documents, etc.
I rather believe that it's more a matter of some programmers' character, than a security measure.
Whatever. My question has been already replied: with a ready made mount command, there's no way a normal user can mount. Period.
Now, let's move to something else.
Last edited by zogoibi; 12-30-2011 at 06:04 PM.
- 12-30-2011 #9Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,685
when i've had to do stuff like this in the past, I wrote a small C prog that took an arbitrary command to run as the first arg to it, and any arguments to that command as additional arguments to the C prog. Then I setuid and setuid 0 in the C prog, compiled it, chowned it to root, chmod 4755 it and i'm golden.
Wildly insecure, but there it is...


1Likes
Reply With Quote

