*- On 25 Jun, Gertjan Klein wrote about "Re: Autofs for root only??"
> On Fri, 25 Jun 1999 16:47:29 -0400 (EDT), William T Wilson
> <[EMAIL PROTECTED]> wrote:
> 
>>If you want to change the permissions of the volume's / directory, change
>>them with chmod once it's mounted.
> 
>   Under normal circumstances that would merely be an annoying
> inconvenience, but since the filesystem is supposed to be automounted I
> don't see how I should do that.  How do people normally do this?  A lot
> of people use extensive partitioning and mount the partitions
> automatically (from /etc/fstab).  Does everyone chmod the permissions
> afterwards?  Is it unreasonable to want an extra filesystem automounted
> owned by root:disk, so certain users can access it?  ("Certain users" in
> this case merely means me, as this is for my home system, but I don't
> want to have to be root all the time in order to access the partition.)
> 

You don't need to do it everytime, just once.  The mounted disk keeps
the permisions you set for it.  Example with a ext2 floppy:

[EMAIL PROTECTED]/}[150]>umount mnt
[EMAIL PROTECTED]/}[151]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 15 18:20 mnt/
[EMAIL PROTECTED]/}[152]>mount -t ext2 /dev/fd0 /mnt
[EMAIL PROTECTED]/}[153]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 25 19:45 mnt/
[EMAIL PROTECTED]/}[154]>cd mnt
[EMAIL PROTECTED]/mnt}[155]>ls -al
total 14
   1 drwxr-xr-x   3 root     root         1024 Jun 25 19:45 ./
   1 drwxr-xr-x  33 root     root         1024 Jun 15 18:20 ../
  12 drwxr-xr-x   2 root     root        12288 Jun 25 19:45 lost+found/
[EMAIL PROTECTED]/mnt}[156]>chown root.disk . lost+found/
[EMAIL PROTECTED]/mnt}[157]>ls -al
total 14
   1 drwxr-xr-x   3 root     disk         1024 Jun 25 19:45 ./
   1 drwxr-xr-x  33 root     root         1024 Jun 15 18:20 ../
  12 drwxr-xr-x   2 root     disk        12288 Jun 25 19:45 lost+found/
[EMAIL PROTECTED]/mnt}[158]>cd ..
[EMAIL PROTECTED]/}[159]>ls -dl mnt
   1 drwxr-xr-x   3 root     disk         1024 Jun 25 19:45 mnt/
[EMAIL PROTECTED]/}[160]>umount /mnt
[EMAIL PROTECTED]/}[161]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 15 18:20 mnt/
[EMAIL PROTECTED]/}[162]>mount -t ext2 /dev/fd0 /mnt
[EMAIL PROTECTED]/}[163]>ls -dl mnt
   1 drwxr-xr-x   3 root     disk         1024 Jun 25 19:45 mnt/
[EMAIL PROTECTED]/}[164]>cd mnt
[EMAIL PROTECTED]/mnt}[165]>ls -al
total 14
   1 drwxr-xr-x   3 root     disk         1024 Jun 25 19:45 ./
   1 drwxr-xr-x  33 root     root         1024 Jun 15 18:20 ../
  12 drwxr-xr-x   2 root     disk        12288 Jun 25 19:45 lost+found/


See the ext2 filesystem on the disk kept the permissions that I gave it.

-- 
Brian 
---------------------------------------------------------------------
Mechanical Engineering                              [EMAIL PROTECTED]
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------

Reply via email to