Re: Change owner and permissions for second hard disk
From: Hacking Coff (jesus_at_messiah.com.plex)
Date: 06/13/04
- Previous message: Linønut: "Re: Best distribution for MultiMediaPC/Personal File server"
- In reply to: thomas icking: "Re: Change owner and permissions for second hard disk"
- Next in thread: Paul: "Re: Change owner and permissions for second hard disk"
- Reply: Paul: "Re: Change owner and permissions for second hard disk"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.)
- Previous message: Linønut: "Re: Best distribution for MultiMediaPC/Personal File server"
- In reply to: thomas icking: "Re: Change owner and permissions for second hard disk"
- Next in thread: Paul: "Re: Change owner and permissions for second hard disk"
- Reply: Paul: "Re: Change owner and permissions for second hard disk"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|