"sudo mount -a" works perfect but permission denied when mounting on startup, why?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
"sudo mount -a" works perfect but permission denied when mounting on startup, why?
Title says it all really.. when i do mount -a as root or using sudo it mounts the drives perfectly.. but on start-up it says permission denied.. Permission denied on /dev/fuse, I've logged on as root and changed the permissions of that file to read/write for all and even removed it but still doesn't work.
On shut-down it also cannot unmount any of my mounted devices properly.. it says they aren't mounted, both if they are or aren't mounted at the time.
Are the NTFS drives you're accessing local or remote? In any case, the permissions set on the NTFS files can interact -- sometimes rather strangely -- with your Linux permissions.
Also, note that fuse is mounting the files in "user space" (fuse is an acronym for "File System in User Space"), and a user -- not root -- is, I think, needed for the mount.
When you do the sudo, you're in your context, not that of root. What happens if you do a su -; mount -a instead of a sudo mount -a? (I.e., try the mount logged in as root (in root's context).)
Note: I may be blowing smoke here, never having used ntfs-3g but I've had similar problems mounting iso images using fuse. And the umount for the iso image also needed to be done in user space before logoff.
<edit>
Oh, my "work around" was to mount the iso images as part of my session startup.
</edit>
Last edited by PTrenholme; 12-28-2006 at 09:15 AM.
How do I unmount all..just for now.. umount -a? lol
I found that in man ntfs-3g that usually it won't check for permissions but with 1 line it would, but I'm not using that line. Says to read the readme, but I installed using yum so not too sure where it is, i'll look.
Last edited by aaron4katie; 12-29-2006 at 08:51 AM.
I am also using Fedora Core 6 and XP Pro(gaming only).
I change SE Linux to permissive
and replaces the lines I used for the example you shown but using en_UK instead. For once I didn't get any errors and it automatically mounted the devices. I haven't yet shut down or restarted the computer but I expect it to work OK. If something doesn't work as it should I'll reply again, but if I don't you can assume that it's working fine. I cut a file from one of the hard drives onto desktop and then cut it back to test the read-write access and it worked fine.
Just to verify, I had a hard drive error and so it didn't mount that single hard drive, but that was windows fault and the other hard drives still mounted, other than that one time it mounts and unmounts every time, on shutdown or restart a long line is displayed for each unmount but doesn't slow it down and just says something about permissions but unmounts successfully, so I'm not worrying about it.
Im sure most people (including me) would like the ntfs-3g driver working correctly with SElinux set to enforce. According to ntfs-3g, Red Hat fixed the SElinux policy with "selinux-policy-2.4.6-23" but im reluctant to install this yet. Here are the links;
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.