Mount a ufs partition writable by group wheel?

2011-09-02 Thread Michael M
Is it possible to mount a ufs partition writable by group wheel?  How would
the fstab entry look?

Thanks,
Michael M
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount a ufs partition writable by group wheel?

2011-09-02 Thread Trond Endrestøl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 2 Sep 2011 13:01+0200, Michael M wrote:

 Is it possible to mount a ufs partition writable by group wheel?  How would
 the fstab entry look?

It really depends on what you want to achieve.

If it's okay that the (local) root directory of said filesystem is 
(co-)owned by the wheel group, then:

mount /filesystem, run 
chgrp wheel /filesystem, and finally run
chmod g+w /filesystem

Maybe you should look into POSIX ACLs, etc if you are looking for 
something more advanced.


Trond.

- -- 
- --
Trond Endrestøl  | trond.endres...@fagskolen.gjovik.no
ACM, NAS, NUUG, SAGE, USENIX |FreeBSD 8.2-STABLE  Alpine 2.00

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk5gv8cACgkQbYWZalUoElvVbgCdHpQGTE9MCypqjD9FxT9FDJQP
LvEAnjd1tHBrs9AxSHN84NN3iWNYsGEf
=DjyX
-END PGP SIGNATURE-___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Mount a ufs partition writable by group wheel?

2011-09-02 Thread Polytropon
On Fri, 2 Sep 2011 13:01:58 +0200, Michael M wrote:
 Is it possible to mount a ufs partition writable by group wheel? 

It is. :-)



 How would
 the fstab entry look?

Maybe like this:

# Device Mountpoint FStype Options Dump Pass
# -  -  -  --  -
/dev/da0 /mnt   ufsrw  22

The mount point (directory /mnt in this example) has to be +w
for wheel, e. g.

# chown root:wheel /mnt
# chmod u=rwx,g=rwx,o=rx /mnt
# mount /mnt

That should be _nearly_ the default (FreeBSD/x86 8.2-STABLE here):

drwxr-xr-x   2 root  wheel  512 Feb 18  2011 mnt/
 ^
This is where you could use

# chmod g+w /mnt

to allow writes for members of the wheel group.

You may apply further restrictions (e. g. -rx for others) if needed),
and maybe noauto on the options field.

For mounting in general: The user issuing the mount command has
to have proper access to the device file (/dev/da0 in this example)
_and_ the target directory.



See man mount and man fstab for details.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount a ufs partition writable by group wheel?

2011-09-02 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Fri Sep  2 06:30:22 2011
 Date: Fri, 2 Sep 2011 13:01:58 +0200
 From: Michael M thecr...@gmail.com
 To: freebsd-questions@freebsd.org
 Subject: Mount a ufs partition writable by group wheel?

 Is it possible to mount a ufs partition writable by group wheel?

Of course.  

   How would
 the fstab entry look?

just like any other fstab entry.



It might be a good idea to explain exactly what you want to be able to do,
first.

When you just ask a question about the 'mechanics' of an operation with
many possible interpretations, you'll get useless answers.  (see above :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount a ufs partition writable by group wheel?

2011-09-02 Thread Michael M
Excuse my generic question, I should have asked:

Can the group rw options for given partition destination be defined in fstab
upon mount?

Thanks,
Michael M

On Fri, Sep 2, 2011 at 2:02 PM, Robert Bonomi bon...@mail.r-bonomi.comwrote:

  From owner-freebsd-questi...@freebsd.org  Fri Sep  2 06:30:22 2011
  Date: Fri, 2 Sep 2011 13:01:58 +0200
  From: Michael M thecr...@gmail.com
  To: freebsd-questions@freebsd.org
  Subject: Mount a ufs partition writable by group wheel?
 
  Is it possible to mount a ufs partition writable by group wheel?

 Of course.

How
 would
  the fstab entry look?

 just like any other fstab entry.



 It might be a good idea to explain exactly what you want to be able to do,
 first.

 When you just ask a question about the 'mechanics' of an operation with
 many possible interpretations, you'll get useless answers.  (see above :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount a ufs partition writable by group wheel?

2011-09-02 Thread Polytropon
On Fri, 2 Sep 2011 16:08:08 +0200, Michael M wrote:
 Excuse my generic question, I should have asked:
 
 Can the group rw options for given partition destination be defined in fstab
 upon mount?

No. The access rights depend on the owner:group permissions
of the mountpoint directory. The _act_ of mounting depends
on the mounter's ownership of the corresponding device files.

So in order to to only allow wheel group members to access
a certain mount point for ug=rwx, the permissions of that
mount point have to be set. This is done independently from
what /etc/fstab is for (which controls the _act_ of mounting
if all requirements - as mentioned above - are met).

However, there _are_ options that can be included in fstab
for applying a certain mask to files contained in a mounted
directory, see -m and -M in man mount_msdosfs for example.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount a ufs partition writable by group wheel?

2011-09-02 Thread Michael M
On Fri, Sep 2, 2011 at 4:31 PM, Polytropon free...@edvax.de wrote:

 On Fri, 2 Sep 2011 16:08:08 +0200, Michael M wrote:
  Excuse my generic question, I should have asked:
 
  Can the group rw options for given partition destination be defined in
 fstab
  upon mount?

 No. The access rights depend on the owner:group permissions
 of the mountpoint directory. The _act_ of mounting depends
 on the mounter's ownership of the corresponding device files.

 So in order to to only allow wheel group members to access
 a certain mount point for ug=rwx, the permissions of that
 mount point have to be set. This is done independently from
 what /etc/fstab is for (which controls the _act_ of mounting
 if all requirements - as mentioned above - are met).

 However, there _are_ options that can be included in fstab
 for applying a certain mask to files contained in a mounted
 directory, see -m and -M in man mount_msdosfs for example.



 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...



Thanks for the info :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org