|
Title: HowTo set disk access permissions on a desktop PC (VFAT & Linux Native) Introduction: Continuing Windows users may like to maintain a Fat32 partition for data storage. Users also sometimes like to use a separate partition with a Linux Native filesystem as a common data store for all distributions. This HowTo shows the settings for users to have read/write access to these partitions. With the progression from Suse 10.0 through openSUSE 10.3, this tutorial has become superseded. Until I can update this page I refer you here: Temporary Link∞ Scene Setting: The screenshot below shows a typical view of the partitions and mounts for partitions on the primary hard drive in a PC. ![]() There are six partitions in this example on hda and their usage is: hda1 is a VFAT (Fat32) partition for a Windows XP operating system; mount point is /mnt/hda1f32_XP hda2 is a VFAT (Fat32) partition used for data storage; mount point here is /mnt/hda2f32 hda3 is an extended partition. Its purpose is to contain logical partitions as follows: hda5 is the Linux swap partition hda6 is a ReiserFS partition for a Linux operating system; mount point is / hda7 is an Ext3 partition used for data storage; mount point is /mnt/hda7ext3 The partitions hda2 and hda7 as created have default read/write access for root (superuser) but inadequate access for normal users. User Permissions for a VFAT filesystem/partition (hda2) Case1: Only one ordinary user has read/write access to the VFAT drive (hda2) I call a normal VFAT partition one that is either created as a primary partiton or one that is created as a logical partition before [=having lower cylinders than] any logical Linux partitions. Non normal VFAT partitions can behave oddly. Suppose you install a Linux distribution on a disk that already has a "normal" VFAT partition as either a primary or a logical partition. Since I want to mount it as accessible to a particular user, it could (not must) be mounted in "user" territory. For example consider the user john. Create a mount folder/point at, e.g. hda2f32, at /home/john/hda2f32 so it will have john's default user and group permissions. Set the mount point in the filesystem table (fstab is at /etc/fstab) to /home/john/hda2f32 and set the default group and user permissions to john's defaults (e.g. uid=1000, gid=100). Here are screenshots of one distribution's GUI partitioner showing appropriate settings ![]() and ![]() The entry in fstab for this configuration is: /dev/hda2 /home/john/hda2f32 vfat uid=1000,gid=100 0 0 This gives the appropriate access which is john can read/write and orher users can read only. To make sure the set up is locked in:Do This: Log in as john, in a console change to root/superuser and "unmount /dev/hda2". Then go into media mangaer (my computer or something like that) and remount hda2 by clicking the icon (or as john in a console "mount /dev/hda2"). Check in a file browser that john has ownership of the folder /home/john/hda2f32. Case 2:all users have equal read/write access to the VFAT drive (hda2) Proceed from the current configuration and edit fstab as root to make the entry for hda2 as follows: /dev/hda2 /home/john/hda2f32 vfat user,noauto 0 0 Another way to achieve this is to use the GUI partitioner and take out "user=1000, gid=100" in screenshot 3 and checkmark "mountable by user = 'user' in fstab" and "do not mount at system startup = 'noauto' in fstab". Then hda2 has read/write permission for all ordinary users. When you log in, most likely hda2 will be mounted and owned by the previous user. Undo this from a console by (1) become root/superuser and enter "umount /dev/hda2" (2) close and reopen the console as an ordinary user and enter "mount /dev/hda2" User Permissions for a Linux Native filesystem/partition (hda7) The difficulty that VFAT presents arises because the filesystem works well only in an egalitarian environment with essentially no variations in permissions. Windows developed that way but in Linux there are levels of permission and a native Linux filesystem is very suitable. There is essentially no configuration to worry about for a straightforward situation using a Linux filesystem. If we create and mount a Linux native filesystem the defaults are sufficient to provide adequate and easy assignment of permissions. Consider for example an Ext3 partition. The partitioner for most distributions more or less forces one to set a mount point. I usually choose a point that reflects the filesystem and position of the partition. e.g. if filesystem is Ext3 and placement is hda7 I would mount at /mnt/hda7ext3. i.e.the mount point is a pretty flexible choice. Having done so the default entry in fstab would be: /dev/hda7 /mnt/hda7ext3 ext3 acl,user_xattr 1 2 That's fine and all we have to do to accommodate each user is log in as root and create a folders in the root of the new partition, one for each user bearing the user's default permissions. That folder is then available to the owner on login. Credits : Swerdna's web site∞, internet help forums Comments & Suggestions: http://forums.suselinuxsupport.de/index.php?act=ST&f=51&t=35171&st=0#entry157855∞ |
Warning: include(http://forums.suselinuxsupport.de/ssi.php?a=active) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/customers/webs/slwiki/actions/footer.php on line 51
Warning: include() [function.include]: Failed opening 'http://forums.suselinuxsupport.de/ssi.php?a=active' for inclusion (include_path='.:/home/customers/webs') in /home/customers/webs/slwiki/actions/footer.php on line 51
There are no comments on this page. [Add comment]