Re: Mount Point permissions
Bob Richards wrote: On Thursday 10 August 2006 18:40, you wrote: you want my devfs.rules and snips from other files. Thanks Chris; that would be appreciated. Bob Hi Bob The settings below allow user1 to mount and write to usb mass storage, floppy and cds (read only) on anywhere he owns. I created a new group usermount and directories ~user1/fd0, ~user1/cdrom and ~user1/usb. Of course you have to reboot or set everything manually before they will take effect. === /etc/rc.conf ... ... usbd_enable="YES" devd_enable="YES" devfs_system_ruleset="usb_device_perms" /etc/devfs.rules [usb_device_perms=100] add path 'da*s*' mode 0660 group usermount /etc/devfs.conf ... ... # Allow user to access floppy own fd0 root:usermount perm fd0 0660 # Allow user access to cdrom own xpt0root:usermount permxpt00660 own cd0 root:usermount permcd0 0660 linkcd0 cdrom linkcd0 dvd own pass0 root:usermount permpass0 0660 own cd1 root:usermount permcd1 0660 own pass1 root:usermount permpass1 0660 /etc/fstab # DeviceMountpoint FStype Options DumpPass# ... ... #/dev/cd0 /mnt/cdrom cd9660 ro,noauto 0 0 /dev/cd0 /usr/home/user1/cdrom cd9660 ro,noauto 0 0 /dev/fd0 /usr/home/user1/floppy msdosfs rw,noauto,sync 0 0 #/dev/fd0 /mnt/floppy msdosfs rw,noauto 0 0 /etc/group ... ... usermount:*:1004:user1 /etc/sysctl.conf vfs.usermount=1 and here's the result with some things mounted. Note without a cd mounted ~/user1/cdrom is owner user1, group user1, not sure why it changes when a cd is mounted. %id uid=1001(user1) gid=1001(user1) groups=1001(user1), 5(operator), 1004(usermount) %pwd /usr/home/user1 %ls -ld usb cdrom floppy dr-xr-xr-x 20 rootwheel 6144 7 May 12:58 cdrom drwxr-xr-x 1 user1 user1 7168 1 Jan 1980 floppy drwxr-xr-x 1 user1 user1 6144 1 Jan 1980 usb %ls -l /dev/da0s1 /dev/cd0 /dev/fd0 crw-rw 1 root usermount0, 84 13 Aug 11:07 /dev/cd0 crw-rw 1 root usermount0, 105 13 Aug 11:07 /dev/da0s1 crw-rw 1 root usermount0, 79 13 Aug 11:07 /dev/fd0 %mount ... ... devfs on /dev (devfs, local) /dev/fd0 on /usr/home/user1/floppy (msdosfs, local, nosuid, mounted by user1) /dev/cd0 on /usr/home/user1/cdrom (cd9660, local, nosuid, read-only, mounted by user1) /dev/da0s1 on /usr/home/user1/usb (msdosfs, local, nosuid, mounted by user1) % cheers Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
On Thu, Aug 10, 2006 at 11:40:46PM +0100, Chris Whitehouse wrote: > Bob Richards wrote: > >On Wednesday 09 August 2006 23:23, you wrote: > > > >>>What about chowning the permissions on /dev/fd0 to be root:floppyusers, > > > >I went so far as chown bob:bob /dev/fd0 But after newfs get's through with > >the new floppy, it's chowned to root. > > > >>add a group floppyusers to /etc/group and make bob a member of that group. > >>Chmod 664 /dev/fd0 > > > >Went down that road as well; created a group called "mounters", added bob > >to it no good! I even copied newfs to /home/bob/bin, put home/bob/bin > >first in the PATH, made that newfs setuid/setgid bob no effect :-( Root > >wants to own the newly created file system no matter who formatted or > >created it. > > > >>Unfortunately I don't have any machines with floppy drives to test with. > > > >I personally don't have a need for floppy drives either; but I am setting > >up a dozen W/S to replace WINDOWZ in an office environment, and people > >expect to be able to use their floppies (especially with the GUI tools in > >KDE 3.5). I am hoping to use freebsd instead of Linux; which has become > >hard to maintain in long-term use because of things like libraries > >changing so often. The lack of "Library-Hell" in freebsd is refreshing. > > > >I guess "floppy-hell" is better than Library-hell :-) Floppy support is > >pretty bad on freebsd! I made the mistake of ejecting a mounted floppy > >yesterday; total system lock-up! I mean it was power off/on time! Not good! > > > >Bob > > > >___ > >freebsd-questions@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-questions > >To unsubscribe, send any mail to > >"[EMAIL PROTECTED]" > > > > > > > I wonder if these will help > > http://caia.swin.edu.au/reports/041130A/ > http://networking.ringofsaturn.com/Unix/FreeBSD-Burning.php > > I am sure there is also something in the handbook or FAQ but I can't > spot it at the mo. > > Also consider x11-fm/mtoolsfm. This is a graphical utility that allows > copying files between hard disk, floppy disk and usb key _without_ > mounting the removeable drives. It is limited to fat or fat32 > filesystems but it does mean your users won't crash the box when they > yank the usb key or floppy without unmounting. > > I've got this all set up on one box, including cd/dvd burning but it > would take a bit of digging to find all the bits. Email me offlist if > you want my devfs.rules and snips from other files. > > Chris I am using floppies on rare occasions on an old Dell. My setup is as follows: /etc/fstab does not have any reference to /dev/fd0 in the /usr/local/etc/sudoers file I have the following: # User privilege specification rootALL=(ALL) ALL aj ALL=/sbin/umount,/sbin/mount_msdosfs # end of sudoers file I have a directory with file permission 755 aj:aj /usr/home/aj/floppy ( make sure all your users have a directory call floppy with the correct file permission ) I use a small script owned by root but may be executed by all inside this script is a small message tell you it will be mounting a floppy and it must not be copy-protected next is the following line: sudo mount_msdosfs /dev/fd0 ~/floppy Now I use fluxbox...but this can be adapted to KDE withing the fluxbox menu I added the following: aterm -fg white -bg black -e name_of_script.sh ( note: I am using aterm not xterm...but should work xterm -e name_of_script.sh ) make another script to unmount with the following command sudo umount /dev/fd0 Have fun with FreeBSD... -- FreeBSD 6.0 i386 GENERIC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
Bob Richards wrote: On Wednesday 09 August 2006 23:23, you wrote: What about chowning the permissions on /dev/fd0 to be root:floppyusers, I went so far as chown bob:bob /dev/fd0 But after newfs get's through with the new floppy, it's chowned to root. add a group floppyusers to /etc/group and make bob a member of that group. Chmod 664 /dev/fd0 Went down that road as well; created a group called "mounters", added bob to it no good! I even copied newfs to /home/bob/bin, put home/bob/bin first in the PATH, made that newfs setuid/setgid bob no effect :-( Root wants to own the newly created file system no matter who formatted or created it. Unfortunately I don't have any machines with floppy drives to test with. I personally don't have a need for floppy drives either; but I am setting up a dozen W/S to replace WINDOWZ in an office environment, and people expect to be able to use their floppies (especially with the GUI tools in KDE 3.5). I am hoping to use freebsd instead of Linux; which has become hard to maintain in long-term use because of things like libraries changing so often. The lack of "Library-Hell" in freebsd is refreshing. I guess "floppy-hell" is better than Library-hell :-) Floppy support is pretty bad on freebsd! I made the mistake of ejecting a mounted floppy yesterday; total system lock-up! I mean it was power off/on time! Not good! Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" I wonder if these will help http://caia.swin.edu.au/reports/041130A/ http://networking.ringofsaturn.com/Unix/FreeBSD-Burning.php I am sure there is also something in the handbook or FAQ but I can't spot it at the mo. Also consider x11-fm/mtoolsfm. This is a graphical utility that allows copying files between hard disk, floppy disk and usb key _without_ mounting the removeable drives. It is limited to fat or fat32 filesystems but it does mean your users won't crash the box when they yank the usb key or floppy without unmounting. I've got this all set up on one box, including cd/dvd burning but it would take a bit of digging to find all the bits. Email me offlist if you want my devfs.rules and snips from other files. Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
On Thursday 10 August 2006 00:50, Micah wrote: > One possible workaround is to use msdosfs instead of ufs. Seems to work > fine for my regular user account. But I agree that floppy support sucks. > Try accidentally mounting a write-protected floppy as rw. You get a > flood of errors that cannot be cleared without a reboot. > Micah: If we are intent to ween people off Micro$h|t, we have to take care of the "little things". It's hard to sell an alternative, when that alternative barfs on a simple thing like Floppy-Use. The "big" stuff is in place already; M$ cpmpatibilitynin WP, Spread-sheets, mail... etc. is already far better than M$. It is the small crap, liike Floppy drive use, which makes the "conversion" a problem! The open-source community have to get their act together, and realize that main-stream users will gladly switch to FreeBsd/Linux when and ONLY when all the basics are working. For a geek, these "problems" are trivial; for a WindowZ idiot, these thjings are what kills a sale, and maintains Wind0WZ dominance in user-space. Bob pgpeCKO0kLCE8.pgp Description: PGP signature
Re: Mount Point permissions
Bob Richards wrote: On Wednesday 09 August 2006 23:23, you wrote: What about chowning the permissions on /dev/fd0 to be root:floppyusers, I went so far as chown bob:bob /dev/fd0 But after newfs get's through with the new floppy, it's chowned to root. add a group floppyusers to /etc/group and make bob a member of that group. Chmod 664 /dev/fd0 Went down that road as well; created a group called "mounters", added bob to it no good! I even copied newfs to /home/bob/bin, put home/bob/bin first in the PATH, made that newfs setuid/setgid bob no effect :-( Root wants to own the newly created file system no matter who formatted or created it. Unfortunately I don't have any machines with floppy drives to test with. I personally don't have a need for floppy drives either; but I am setting up a dozen W/S to replace WINDOWZ in an office environment, and people expect to be able to use their floppies (especially with the GUI tools in KDE 3.5). I am hoping to use freebsd instead of Linux; which has become hard to maintain in long-term use because of things like libraries changing so often. The lack of "Library-Hell" in freebsd is refreshing. I guess "floppy-hell" is better than Library-hell :-) Floppy support is pretty bad on freebsd! I made the mistake of ejecting a mounted floppy yesterday; total system lock-up! I mean it was power off/on time! Not good! Bob One possible workaround is to use msdosfs instead of ufs. Seems to work fine for my regular user account. But I agree that floppy support sucks. Try accidentally mounting a write-protected floppy as rw. You get a flood of errors that cannot be cleared without a reboot. HTH, Micah ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
On Wednesday 09 August 2006 23:23, you wrote: > > What about chowning the permissions on /dev/fd0 to be root:floppyusers, > I went so far as chown bob:bob /dev/fd0 But after newfs get's through with the new floppy, it's chowned to root. > add a group floppyusers to /etc/group and make bob a member of that group. > Chmod 664 /dev/fd0 Went down that road as well; created a group called "mounters", added bob to it no good! I even copied newfs to /home/bob/bin, put home/bob/bin first in the PATH, made that newfs setuid/setgid bob no effect :-( Root wants to own the newly created file system no matter who formatted or created it. > Unfortunately I don't have any machines with floppy drives to test with. I personally don't have a need for floppy drives either; but I am setting up a dozen W/S to replace WINDOWZ in an office environment, and people expect to be able to use their floppies (especially with the GUI tools in KDE 3.5). I am hoping to use freebsd instead of Linux; which has become hard to maintain in long-term use because of things like libraries changing so often. The lack of "Library-Hell" in freebsd is refreshing. I guess "floppy-hell" is better than Library-hell :-) Floppy support is pretty bad on freebsd! I made the mistake of ejecting a mounted floppy yesterday; total system lock-up! I mean it was power off/on time! Not good! Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
On 8/10/06, Bob Richards <[EMAIL PROTECTED]> wrote: Yeah I noticed that. If I become root, and chown the mounted floppy to bob:bob, then on all subsequent mounts of that particular media bob has write access; but ONLY after root intervention. What this means however, is that I can NOT set up a work-station where the user has no root access, and expect that user to effectively use the floppy drive. What a pain! The user can format, mount, and read; but until the media is choned to her/him, by root, they can't write. I didn't have this problem with Linux. What about chowning the permissions on /dev/fd0 to be root:floppyusers, add a group floppyusers to /etc/group and make bob a member of that group. Chmod 664 /dev/fd0 See if that works. Unfortunately I don't have any machines with floppy drives to test with. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
On Tuesday 08 August 2006 17:44, you wrote: > The root directory of the filesystem mounted determines the ownership > and access rights on it. By default, newfs will assign is to root > and set the rights to 0755. You'll need to chown the directory to > the desired user. > Stefan: Yeah I noticed that. If I become root, and chown the mounted floppy to bob:bob, then on all subsequent mounts of that particular media bob has write access; but ONLY after root intervention. What this means however, is that I can NOT set up a work-station where the user has no root access, and expect that user to effectively use the floppy drive. What a pain! The user can format, mount, and read; but until the media is choned to her/him, by root, they can't write. I didn't have this problem with Linux. Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mount Point permissions
Am 07.08.2006 um 23:55 schrieb Bob Richards: The permissions on mount-point /home/bob/floppy are 770 with bob:bob After the mount operation I see: ls -al floppy drwxr-xr-x 3 root wheel 512 Aug 7 11:22 . And of course, bob can only read, but not write. The root directory of the filesystem mounted determines the ownership and access rights on it. By default, newfs will assign is to root and set the rights to 0755. You'll need to chown the directory to the desired user. Stefan -- Stefan Bethke <[EMAIL PROTECTED]> Fon +49 170 346 0140 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"