-
[SOLVED]: /etc/fstab problems! Can't mount as normal user!
Hello!
I can't mount my CD-ROM and my DOS partition as a normal user!
I have edited my /etc/fstab file, but still nothing! This is how I configured DOS partition and CDROM:
/dev/hda1 /mnt/hda1 vfat auto,user,exec,rw 1 0
/dev/cdrom /mnt/cdrom iso9660 auto,user,ro 0 0
I set hda1 to auto, so it would automaticly mount when I boot, I set user option, so I can mount it as a normal user, exec so I can execute apps and rw so I can read and write files to it!
Its mounted when I boot, but when I try to access it as a normal user I get:
-sh: cd: /mnt/hda1: Permission denied
When I try to umount it as a normal user I get this:
umount: only root can unmount /dev/hda1 from /mnt/hda1
When I do:
chown User /mnt/hda1 -R
I get this for each file on the hda1:
chown: changing ownership of `/mnt/hda1/': Operation not permitted
chown: changing ownership of `/mnt/hda1/tc.exe': Operation not permitted
What is wrong with it? How can I access and mount/umount it as a regular user?
The same problem is for CD-ROM, only the difference is that I can access files as a regular user, but still can't mount/umount it! What is the problem!? Thank you!
-
/dev/hda1 /mnt/hda1 vfat auto,umask=000 1 0
/dev/cdrom /mnt/cdrom iso9660 auto,users,ro 0 0
Try that and also make sure the mount point is -rwxrwxrwx before it's mounted.
umask is the key for vfat partitions
as for the CD, all I did was change user to users which means any user can unmount it no matter who mounted it, not a big change at all...maybe your permissions on /usr/bin/mount are not set? What distro are you using? You may need to be part of the wheel group to mount and unmount
-
Change auto to noauto. Then your user account can mount/umount it
-
Thank you! I'm running Slackware 10!
Thank you! I set up fstab like you sad and it works!!!
But what does it mean umask=000?
And why can't I mount /dev/cdrom with user, but can mount only with users? Thank you!
-
man mount and man fstab would be the first place to look.
Linux User #181509
* It can hardly be a coincidence that no language on this planet
has ever come up with the phrase "as pretty as an airport" *
-- Douglas Adams --
-
Originally posted by Yosuke_
And why can't I mount /dev/cdrom with user, but can mount only with users? Thank you!
the users entry says that the "users" group can mount the drive. the group "user" does not exist by default in slackware "or any distro that I now of."
"Cluelessness - There are no stupid questions, but there are a LOT of inquisitive idiots." -- Despair 2005 Calendar
"Life is pleasant. Death is Peaceful. It is the transition that's troublesome." --Isaac Asimov
-
Originally posted by Daedrus
the users entry says that the "users" group can mount the drive. the group "user" does not exist by default in slackware "or any distro that I now of."
No, that's not it. From the mount manpage:
Code:
The file /etc/fstab (see fstab(5)), may contain lines describing what devices are
usually mounted where, using which options. This file is used in three ways:
<...>
(iii) Normally, only the superuser can mount file systems. However, when fstab
contains the user option on a line, then anybody can mount the corresponding sys-
tem.
Thus, given a line
/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 file system found on his CDROM using the command
mount /dev/cdrom
or
mount /cd
For more details, see fstab(5). Only the user that mounted a filesystem can
unmount it again. If any user should be able to unmount, then use users instead of
user in the fstab line.
Note how the manpage does not reference groups anywhere.
The only difference between "user" and "users" is that with "users", anyone can unmount the FS. With "user", only the user that mounted the FS can unmount it.
Yosuke_ -- this is your original problem, too. When you have "auto" in the options, root is the user that mounts the filesystem at boot time (all bootscripts, including the one that mounts filesystems marked "auto", run as root). This means that root is the only user that can unmount that FS. With "users", any user could unmount it, or you could make it "noauto" so that root doesn't mount it automatically at boot time.
-
Originally posted by Yosuke_
But what does it mean umask=000?
From an old post of mine; hope it sheds a little light:
In Linux, permission control works differently for FAT32 and NTFS filesystems than it does for native Linux filesystems (ext2, ext3, reiser, etc.).
Windows doesn't support UNIX-style permissions, and you can only apply permissions to the entire filesystem, not to individual Windows files/folders. This is done with the "umask" option of the mount command.
The value of the permission bits used with umask are the opposite of those used with the chmod command. For example, the following pairs are equivalent:
umask=000 and chmod 777
umask=022 and chmod 755
-
Thank you all for help! Now everything is working! Thank you!
-
Very cool- glad we could help.
Marking this thread as solved...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|