Re: Change permissions of mounted partition


Subject: Re: Change permissions of mounted partition
From: Peter M. Bagnall (pete@surfaceeffect.com)
Date: Tue Oct 17 2000 - 10:24:46 MDT


>I have a second HFS drive mounted using the "mount" command under CS
>1.2.1. I've got the drive mapped to "/mnt/audio". I can set the
>permissions and ownership of the "/mnt/audio" directory so that all
>users can get in, but as soon as I actually *mount* the partition,
>ownership and access switches to root *only* with no write access for
>other users/groups.
>
>I'd like to be able to share this drive via appletalk, but for now,
>appletalk users only have read-only access. Any way I can change it
>so all users have read/write privileges?

The options for this are in the mount command parameters or in /etc/fstab file.

Take a look at the manpage for mount and you should see the options for
setting the protection mode. I'm in MacOS right now so I can't get at my
fstab file, but if you want I can get it for you. Things to note however,
all files will be owned by root if you mount as root IIRC, which means
you'll need to open access to 777 (rxwrxwrxw) to get it to work for
everyone. chmod and chown won't work, they will report failures and exit
with a non zero status.

I was doing this so I could have my homespace readable in both Linux and
MacOS from the same partition. It turns out not to be such a great idea
since some apps (I think it's gnome stuff mainly) trys to set a more
cautious protection level than the 777 I set in the mount. Also if you try
to build anything there's a good chance it won't work since many build
scripts use chmod and it will fail since HFS has nowhere to record
ownership and permission info that linux requires.

If all you want is to share this via appletalk there is no need for the
partition to be HFS anyway. The reason that I did it was because I was
booting from both MacOS and linux and wanted to share the partition
whichever OS I booted into. But if your going to use appletalk to share
over a network and always run linux on your box I'd actually go with ext2
rather than HFS. That way you don't run into any wierd behaviour in linux
that HFS gets you. If you have other reasons for wanting this to be HFS
then clearly that's not an option but it's worth considering.

Let me know if you'd like a copy of my fstab file and I'll send it to you.

Cheers

Pete

--
Peter M. Bagnall
pete@surfaceeffect.com - http://www.surfaceeffect.com/



This archive was generated by hypermail 2a24 : Tue Oct 17 2000 - 10:38:46 MDT