Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to set up fstab to automatically mount my NTFS partitions.
I have used various Mount managers to create the entries in fstab.
The fstab seems fine, but when mounting at boot or even via Nautilus I get the error message that I do not have permission to mount the disk.
1) Can this permission be set in the fstab file? If so what is the syntax of the fstab entry?
2) If not, is there a tool i.e. GUI to set the mount permissions?
What might do the most good in the long run is for you to study the fstab manual. I don't usually tell people to read a manual but in this case it's better than just copying what someone gives you. You'll have a better understanding then for future problems when they occur.
Oops. Distro Yes Karmic Ubuntu 9.1 (Gnome) and I don't think I'm using ntfs-3g?
And the fstab is looking similar to this:
/dev/sda2 /media/Windows 7 ntfs defaults,user 0 0
However I am experimenting with various tools to write in the entries as I believed that the problems lay in the fstab entry. Which is why I asked if the permissions are set in fstab or somewhere else.
I have been able to mount the drives when there are 'no' entries in fstab. But with the entries mount is usually impossible and it has even prevented me booting into Ubuntu.
What might do the most good in the long run is for you to study the fstab manual.
OK. Found one now with a google search.
in this case it's better than just copying what someone gives you.
You'll have a better understanding then for future problems when they occur.
Yes, I understand your point. But for that very reason I want to find a proper program that will set it up properly. So that at a later date, if there is a problem, I can go back to the program instead of having to trawl through a manual just to find the right syntax. Memorising a syntax is not the same as real learning. And a good program should know what to do and do it correctly. So if anyone knows of a good program to do this it would be a great help.
try to eliminate the blank between "Windows" and "7". recreate the mount point without blank : i.e. /media/Windows_7 and retry to mount it with this new location (create the mount point and modify the fstab file).
For your skill, ntfs-3g is the tool used by linux to acces in read/write mode the ntfs partition. ANd you have an ntfs partition that can be managed by ntfs-3g tool, installed in linux.
Using ntfs may allow rw mounting in recent kernels. You can change the ownership and permissions of ntfs filesystems using the uid, gid, fmask and dmask mount options. They effect all files and directories respectively. Please read the mount and mount.ntfs manpages for more options you may want or need. If using ntfs-3g, make sure you have the fuse module available and modprobed. "lsmod | grep fuse"
You don't want to use automounting for externel media. It they are unplugged when you boot, you will be dropped into the rescue shell. You want to use the "noauto" option and use the UUID or the path instead of a device node such as /dev/sdb3. The partition might by /dev/sdc3 the next time you plug it in.
Another way is to use the automount system of your desktop. An advanced tab in properties for the drive may have settings to set how the device is mounted. It depends on your desktop. The desktop does this by using HAL and policy kit. You may need to grant a local user polkit authorization to mount fixed media. (partitions on internal drives)
The rule in question is "org.freedesktop.hal.storage.mount-fixed". There is a "polkit-gnome-authorization" program you can run as root to enable permissions to mount a fixed drive. By default, it is granted for removable storage but denied for fixed storage. The desktop has to obey this policy.
The old school method was to use "user" or "users" with "uid=<username>" which the SUID mount program would allow a regular user to mount. If /bin/mount and /bin/umount are still suid programs, this method may still work. The mount program checks that the device is listed in /etc/fstab and checks the mount options before allowing it.
If that user could access the mounted disk depended on the uid=,gid=,fmask and dmask values. Later udev was used which might change the primary group of the raw device node for the filesystem to grant read/write access. Now polkit uses setfacl instead to control access.
dadrunamok: Thanks. I'll look into ntfs-3g.
linuxlover.chaitanya: "mount command needs root" Yes. But what setting is that controlled by?
backtolinux: "eliminate the blank" Cripes! Have they not got that sort of crap fixed yet?
"the uid, gid, fmask and dmask mount options".
OK heavy reading.
"An advanced tab in properties for the drive may have settings to set how the device is mounted.
I expected to find it there in Nautilus. It seems that is not possible.
There is a "polkit-gnome-authorization" program you can run as root to enable permissions to mount a fixed drive.
Aha! I'll study that too.
Thanks everyone. I'm sure developers have worked hard to get all this working. But it seems a very complicated process for a user just to access the internal disks. I'm not going to let it loose on my daughter just yet.
well the entry in fstab file is correct
/dev/sda2 /mnt/drive2 ntfs-3g defaults 0 0
you can use that entry, i am using similar entry in my fstab to mount ntfs partitions, but it doesn't mount the ntfs partition at beginning as ntfs-3g module in not loaded at that time of booting when other partitions are loaded so you can make another service which loads after loading modules for ntfs-3g and make it run at end of starting other services on your runlevel