Re: Change owner and permissions for second hard disk

From: Hacking Coff (jesus_at_messiah.com.plex)
Date: 06/13/04

  • Next message: Steven Davies: "system hangs on reboot when initialising eth0..help?"
    Date: Sun, 13 Jun 2004 12:13:43 -0400
    
    

    thomas icking wrote:
    > Fred Emmott wrote:
    >
    >
    >><posted & mailed>
    >>
    >>thomas icking wrote:
    >>
    >>
    >>>Hello, friendly helper out there!
    >>>
    >>>My workstation runs now on Red Hat Fedora and with two hard disks, one
    >>>for Linux and one for my personal files. After the installation of
    >>>Fedora, I always had to mount my second hard disk with something like
    >>> mount /dev/hdb1 /home/myhome/mydisk
    >>>To make this step superfluous, I now changed the entry for the second
    >>>hard disk in /etc/fstab to something like
    >>> /dev/hdb1 /home/myhome/mydisk auto auto,user 0 1
    >>>This works: when I start up my system, the second disk is mounted.
    >>>
    >>>But I now have the problem, that all directories and files under mydisk
    >>>have the owner and group "root", and when to change that. It also refuses
    >>>to extend (e.g. with "chmod") the write permissions for the files to all
    >>>users.
    >>>
    >>>Does this problem have to do with the change of the mount command?
    >>>What is going wrong anyway?
    >>
    >>What filesystem are you using for the second hard disk?
    >
    >
    > vfat.
    > This is necessary, because I still need the ability to occasionally remove
    > my first hard disk and to replace it with a windows 98 disk.
    >

    The Short Answer
    mount /dev/hdb1 /home/myhome/mydisk -o 'gid=users,umask=117'

    or in /etc/fstab:
    /dev/hdb1 /home/myhome/mydisk vfat gid=users,umask=117 0 1

    Either grants the group users read/write to the vfat partition/disk. It
    also revokes execute from everyone.

    The Long Answer
    FAT32 and related filesystems weren't designed with security in mind.
    (Surprised?) There's no internal permission system, so the Linux driver
    does what it can by defining a single set of permissions to the entire
    filesystem.

    (One second, while I climb up on my soapbox.)

    By default, Linux puts a restrictive permission set on the FAT32 drive.
    Out of the box, your filesystem is relatively safe. You're forced to
    educate yourself before opening the files to a wider audience. Wouldn't
    it be nice if all software was designed that way? Not quite as
    convenient or user-friendly, but that's the price you pay for security.

    (I'm done now. I'll just climb back down.)

    For a more robust solution, you might want to consider a seperate
    computer. Dig up or buy an old Pentium and set it up as a Linux-driven
    file server. Slap on a modern filesystem, and you can use Samba to
    safely serve files to your Win98 machine (safe for your Linux machines,
    anyway). It's probably overkill, but you can learn alot from a little
    project like that. It might even be fun for you. (Geek.)


  • Next message: Steven Davies: "system hangs on reboot when initialising eth0..help?"

    Relevant Pages

    • Re: Lost root password
      ... Assuming your root filesystem is vxfs, ... Mount the root filesystem of the hard disk; ...
      (comp.unix.unixware.misc)
    • Re: update CE application during runtime
      ... distributing it on the hard disk itself. ... root of the filesystem. ... will be used the next time it's executed in place of the ROM ... "path" includes a folder on this flash filesystem. ...
      (microsoft.public.windowsce.app.development)
    • Re: remove /boot by mistake, /,/usr and /home on partitions with LVM and crypt
      ... WindowsXP and Debian/Linux R4.0 Ecth. ... another hard disk and attached the hard disk which the broken system ... Waiting for root filesystem ... ... debugfs 1.40-WIP ...
      (Debian-User)
    • Re: cloning a FreeBSD HDD
      ... possible just to dump a filesystem to a different hard disk i.e. ... But /dev/ad2 will have a dumpfile on it, not a filesystem. ... boot0sio or mbr is located in absolute sector 0 of the disk. ... a partition starts at the start of the slice to be confusing) with the ...
      (freebsd-hackers)
    • Re: identifying a floppys filesystem type
      ... > mount tells me that it is wrong filesystem type. ... but my hard disk is the reiser filesystem. ... Shouldn't -t reiserfs ... > I tried this with reiserfs, vfat, etc. with same result. ...
      (comp.os.linux.hardware)