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!
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.
No. A normal user cannot unmount a drive that root mounted. If it is a linux partition, you can make all directories and files on the drive only accessable by a certain user or group, but not if it is a FAT32 or NTFS one. Perhaps you can make another sub-directory under /mnt or /media (wherever you want to mount it) and set that directory's permissions. Like:
/mnt/user/partition
mount the drive in 'partition' (or whatever you want to call it)
give 'user' permissions so only a specific user or group can access the drive.
I don't know if this will work, but it is worth a try.
when the computer boots up, it mounts the drives using /etc/fstab, these drives will be root mounted, can I set an option to mount the drives by another user at startup ?
I don't know of any way to do it. But why would you need to? If you want a drive to be mounted at startup, why would you need to unmount it later?
If you want only a specific user/group to access/write to some files, make subfolder(s) and set the permissions appropritely. This also has the advantage of each user having their own files on one single partition.
You can put 'user' between the parameters in the specific fstab line. Like this:
Code:
/dev/hda1 / reiser4 auto,user,ro 1 1
That way a normal user can mount/umount partitions (or cd's and stuff). Also, when mounted at boot, a user should be able to umount it anyway. So I don't think mounting it as root will prohibit any user from unmounting it with the above option in the fstab - but I'm not 100% sure about that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.