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.
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.