fstab: giving a user acct read-only access to specific partition
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
fstab is probably the wrong place to try to set such permissions. fstab tells the systems which partitions, devices, etc., can be mounted; not who can access them. Try setting up a Group to identify who is allowed access to the partition, and put the names of the allowed user's in that group. Then use chown to set the group name in the properties.
I believe what you would need to do is set the permissions for the file that serves as the mount point for that partition.
For instance, I have a partition, /dev/hda12, that has a mount point (a directory) named /data-1. I would then set the ownership and read/write permissions of that file so that when it is mounted it would be accessable (or not) as you wish.
If you set the partition to be mounted read only in fstab, this will be a global setting (I believe) and not what you are looking to do. For instance, if you enter in fstab
for the partition, this will make guest the only person, other that root, that can mount the partion, but once mounted, all will have ro access to the partition.