chmod for partitions

chmod for partitions

Post by Yun Gee K » Thu, 10 Nov 1994 15:04:05



I am trying to set the permissions for both of my physical drives.  Yes, I
am logged in as the 'root' user and I can set the permissions for anything,
but not my two physical drive partitions that appear as directories from
the root directory level.

Is there a way to set the permissions for the root directory and it's sub
directory?  I have my OS/2 and DOS partitions on these and want to restrict
access to these partitions to other users on my Linux.

Help would be much appreciated.  Please email me if you can help.
Thank you very much.

 
 
 

chmod for partitions

Post by Matt Be » Fri, 11 Nov 1994 04:39:12



: I am trying to set the permissions for both of my physical drives.  Yes, I
: am logged in as the 'root' user and I can set the permissions for anything,
: but not my two physical drive partitions that appear as directories from
: the root directory level.

: Is there a way to set the permissions for the root directory and it's sub
: directory?  I have my OS/2 and DOS partitions on these and want to restrict
: access to these partitions to other users on my Linux.

If I understand your question right, you have a situation such as /dos
being the mountpoint for the dos partition, /os2 for the os2 partition,
etc. (not the actual directory names, just examples). What you want to
do, depending on how you mount the partitions, is adjust the umask. If
you mount them manually, add "-o umask=077" (for example) to adjust the
permissions for /dos so that only root can access (or however you want
to limit access). Similarly, if you automount them in /etc/fstab, use
"umask=xxx" instead of "defaults".

A more flexible form of access is to create a new group so that several
users can access the partition. Use "umask=xxx,gid=yyy" for the options,
where umask is the appropriate umask (i.e. 037 will give read access to
the group, r/w to root, and none to others) and gid is the group id # of
the new group.

Matt

 
 
 

chmod for partitions

Post by Ken Edwar » Fri, 11 Nov 1994 03:27:06



: I am trying to set the permissions for both of my physical drives.  Yes, I
: am logged in as the 'root' user and I can set the permissions for anything,
: but not my two physical drive partitions that appear as directories from
: the root directory level.

: Is there a way to set the permissions for the root directory and it's sub
: directory?  I have my OS/2 and DOS partitions on these and want to restrict
: access to these partitions to other users on my Linux.

/etc/fstab:
/dev/hda1       /C:      msdos      defaults,umask=700,user
--