[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partitioning new disk, users rigths?



Hello Ernst-Magne,

Your story isn't very clear to me. The same could be true for others
in this list. Let's see if we can clarify a few things.

On Fri, Mar 11, 2005 at 06:57:23PM +0100, Ernst-Magne Vindal wrote:
> Hi, I've just moved my system from a 40G disk to 80G, and need some help
> to set the correct user rights.

Did you remove the old disk or is it still present in your computer?

> I'm not sure about what the right "debian way" is so here is what I did.
> The new disk is hdd
> 
> Then with fdisk I created 1 extended disk, then two logical partition on
> about the same size, then mkfs.ext3 /dev/hddX on both.
> 
> Now part info from fdisk give me this:
> Disk /dev/hdd: 40.0 GB, 40020664320 bytes

You say the new 80 GB disk is hdd, yet fdisk says here that hdd is 40
GB. What's going on?

> 16 heads, 63 sectors/track, 77545 cylinders
> Units = cylinders of 1008 * 512 = 516096 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/hdd1               1       77545    39082648+   5  Extended
> /dev/hdd5               1       35000    17639937   83  Linux
> /dev/hdd6           35001       77545    21442648+  83  Linux
> 
> df -h gives this output:
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hdd5              17G   33M   16G   1% /disk2/hdd5
> /dev/hdd5              17G   33M   16G   1% /disk2/hdd6

That's 17+17=34 GB. What happened to the rest of the disk? Are you
saving some space for later? That's fine. If not, then things seem to
have gone wrong here and you may want to retry partitioning. Try the
program cfdisk instead of fdisk. It's more userfriendly. 'parted' can
probably also be used if you have it installed.

> Let's say, /dev/hdd5 is for users to play with (that's me), how do I set
> the right permission there?
> OR
> If I created a folder on one of the partition, what is the correct rights
> to set so users is able to play around? I meen full access.

One partition needs to be mounted on the root directory, '/'. Or is that
already the case for a partition on your other disk?

The partition that you want to play with can be mounted on another
folder, let's say /mnt/play. Create that directory first. Then as root
do 'mount /dev/hdd5 /mnt/play' or something like that. You may want to
edit /etc/fstab for that. See 'man fstab' if you don't know how to do
that.

> I could ofcause just set chown username:groupname /dev/hddx or /folder and
> then chmod (0)777 or something, but is that the right way of doing it?

Leave /dev/hddx as it is. Users don't usually need rights on those
device files.

Do you want users to have unlimited access to the whole partition? Or
just one folder on that partition? Let's say the last. And let's say
you have mounted that partition on /mnt/play like mentioned
above. Then as root just do 'mkdir /mnt/play/folder'.

> Can I create a group and add members there?

You could make a group 'users' and add users there. Then as root
chgrp users /mnt/play/folder
and
chmod 0777 /mnt/play/folder

As the folder is still owned by root you may need to change the
ownership to a normal user.

Actually now I think about it, this whole group thing should not be
necessary when you do the chmod command.

> Well....I postponed this mail and did some further googleling and test
> before I sent it, and this is definitively not the way it should be
> done:( .If I create a folder on hdd5, it also appear on hdd6, same if I
> delete...

That seems *very* strange to me. I don't see how you managed to do
that. :)


HTH somewhat...

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key: keyserver.net ID 0x1735C5C2
"Let your advance worrying become advance thinking and planning."
 - Winston Churchill

Attachment: signature.asc
Description: Digital signature


Reply to: