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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-14-2008, 02:42 AM
|
#1
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
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?
|
|
|
08-14-2008, 09:11 PM
|
#2
|
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:
|
Quote:
Originally Posted by openSauce
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...
|
|
|
08-15-2008, 04:25 AM
|
#3
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Original Poster
Rep:
|
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]
|
|
|
08-15-2008, 06:06 PM
|
#4
|
LQ Newbie
Registered: Sep 2006
Distribution: Whatever flavor of the month I want, Ubuntu, Gentoo, Mint, Fedora
Posts: 15
Rep:
|
Is the permission denied the only message pertaining to that mount during boot? or is there something else like folder does not exist?
|
|
|
08-19-2008, 05:14 AM
|
#5
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Original Poster
Rep:
|
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.
|
|
|
10-06-2008, 01:07 PM
|
#6
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:09 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|