Linux - General This 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. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-16-2004, 09:13 PM
|
#1
|
LQ Newbie
Registered: Oct 2003
Posts: 18
Rep:
|
fstab: giving a user acct read-only access to specific partition
I have looked on google, searching for a way to do this, I know it should be possible, but I didn't find any information on how to do it.
I have a partition (dev/hda2), that I want to make available to the "guest" user, but as read-only.
The relevant line from my /etc/fstab is:
/dev/hda2 /mnt/hda2 vfat auto,rw
Again, only the "guest" user should be able to access the partition, and only in read-only mode. If it is needed, the UID of the guest user is 1001.
Thanks in advance!
|
|
|
05-16-2004, 11:37 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
|
|
05-16-2004, 11:44 PM
|
#3
|
Senior Member
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348
|
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
noauto,guest,ro
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.
HTH
|
|
|
05-17-2004, 01:18 AM
|
#4
|
LQ Newbie
Registered: Oct 2003
Posts: 18
Original Poster
Rep:
|
[edit]
I'm not sure what you mean, Franklin.
The partition itself is vfat, chmod won't work on the files themselves. This is what stumps me.
Last edited by doorbits; 05-17-2004 at 01:42 AM.
|
|
|
05-18-2004, 02:11 PM
|
#5
|
LQ Newbie
Registered: Oct 2003
Posts: 18
Original Poster
Rep:
|
chmoding the /dev/hda2 does not make any difference. Neither does chmoding the /mnt/hda2 (mount point?). Filesystem was umounted before chmod, and remounted afterwards.
|
|
|
All times are GMT -5. The time now is 01:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|