LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2008, 01:42 AM   #1
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Trying to mount loop device during boot: permission denied


Hi,

I'm using Fedora core 8, and I have a file containing an ext3 filesystem I want to mount during bootup, but get a 'permission denied' error. Here is the entry in /etc/fstab:
Code:
/mnt/data/.filename	/home/user/mntpoint	ext3	loop,user,defaults	0 0
/mnt/data is the mountpoint of an NTFS partition whose fstab entry occurs above the one for the file, and which mounts correctly.

With the above entry in fstab, the command
Code:
mount /home/user/mntpoint
mounts the filesystem when I execute it after logging in. root is also able to execute that command successfully. But during boot I get the message:
Code:
/mnt/data/.filename: permission denied
/mnt/data is normally mounted with me as the owner and permissions rwxrwxrwx. I tried mounting it with root as the owner and the same permissions, but got the same error message. I also tried changing the mountpoint to /mnt/mntpoint (owned by root rather than me), but still got the same message.

If root executes 'mount -a' from a terminal when /mnt/data is not mounted, then /mnt/data/.filename mounts successfully. The permission error only occurs during boot. What else could be affecting the permissions here?
 
Old 08-14-2008, 08:11 PM   #2
cyclepathology
LQ Newbie
 
Registered: Sep 2007
Location: Seattle, WA
Distribution: Red Hat, Ubuntu, PCLinuxOS, Fedora, Vector Linux, CentOS, HP-UX, Solaris, AIX, FreeBSD
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by openSauce View Post
Hi,

I'm using Fedora core 8, and I have a file containing an ext3 filesystem I want to mount during bootup, but get a 'permission denied' error. Here is the entry in /etc/fstab:
Code:
/mnt/data/.filename	/home/user/mntpoint	ext3	loop,user,defaults	0 0
/mnt/data is the mountpoint of an NTFS partition whose fstab entry occurs above the one for the file, and which mounts correctly.

With the above entry in fstab, the command
Code:
mount /home/user/mntpoint
mounts the filesystem when I execute it after logging in. root is also able to execute that command successfully. But during boot I get the message:
Code:
/mnt/data/.filename: permission denied
/mnt/data is normally mounted with me as the owner and permissions rwxrwxrwx. I tried mounting it with root as the owner and the same permissions, but got the same error message. I also tried changing the mountpoint to /mnt/mntpoint (owned by root rather than me), but still got the same message.

If root executes 'mount -a' from a terminal when /mnt/data is not mounted, then /mnt/data/.filename mounts successfully. The permission error only occurs during boot. What else could be affecting the permissions here?
What happens if you add the _netdev option to your loopback file system?

I'm speculating...
 
Old 08-15-2008, 03:25 AM   #3
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Original Poster
Rep: Reputation: 39
I still get permission denied, although at a slightly later time. I don't know how to get a log of the messages that come up on the screen during boot (if anyone knows how to do this in Fedora Core 8 please let me know - tried dmesg but those messages are different), so I'm paraphrasing here, but basically the difference is:

without _netdev
Code:
Mounting filesystems in /etc/fstab...             [FAILED]
// some other messages...
Mounting other filesystems... /mnt/data/.filename: permission denied
                                                  [FAILED]

with _netdev
Code:
Mounting filesystems in /etc/fstab...             [OK]
// some other messages...
Mounting other filesystems... /mnt/data/.filename: permission denied
                                                  [FAILED]
 
Old 08-15-2008, 05:06 PM   #4
Tk3thelinuxnewb
LQ Newbie
 
Registered: Sep 2006
Distribution: Whatever flavor of the month I want, Ubuntu, Gentoo, Mint, Fedora
Posts: 15

Rep: Reputation: 0
Is the permission denied the only message pertaining to that mount during boot? or is there something else like folder does not exist?
 
Old 08-19-2008, 04:14 AM   #5
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Original Poster
Rep: Reputation: 39
Only permission denied. It turns out to be SELinux causing the problem (if I disable it, the file mounts successfully). Unfortunately I haven't managed to set up an selinux policy that will allow me to mount the file at boot, but it's not too much hassle to just mount it after I log in.
 
Old 10-06-2008, 12:07 PM   #6
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Original Poster
Rep: Reputation: 39
In case anyone else has this problem, I managed to work around it by putting the command to mount the filesystem in my ~/.bash_profile. It does mean I get an error message if I log in a 2nd time, but this can be ignored, or you can put a slightly smarter command in the profile.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
mounting any device in fstab = Permission denied when trying to cd without root. Romanus81 Slackware 5 06-03-2008 11:24 PM
NFS mount: Permission denied toreric Linux - Networking 15 03-03-2006 11:33 AM
cannot mount anything; I'm denied permission help! DemoniX Slackware 5 08-07-2005 11:04 AM
device /dev/dsp can't be opened (Permission denied) jon_k Linux - Software 1 10-27-2004 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration