[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Autofs for root only??



*- 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
> <fluffy@snurgle.org> 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:

{root@brian}{/}[150]>umount mnt
{root@brian}{/}[151]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 15 18:20 mnt/
{root@brian}{/}[152]>mount -t ext2 /dev/fd0 /mnt
{root@brian}{/}[153]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 25 19:45 mnt/
{root@brian}{/}[154]>cd mnt
{root@brian}{/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/
{root@brian}{/mnt}[156]>chown root.disk . lost+found/
{root@brian}{/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/
{root@brian}{/mnt}[158]>cd ..
{root@brian}{/}[159]>ls -dl mnt
   1 drwxr-xr-x   3 root     disk         1024 Jun 25 19:45 mnt/
{root@brian}{/}[160]>umount /mnt
{root@brian}{/}[161]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 15 18:20 mnt/
{root@brian}{/}[162]>mount -t ext2 /dev/fd0 /mnt
{root@brian}{/}[163]>ls -dl mnt
   1 drwxr-xr-x   3 root     disk         1024 Jun 25 19:45 mnt/
{root@brian}{/}[164]>cd mnt
{root@brian}{/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                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: