Change Permissions on a new hard drive to allow
James Gray
james at gray.net.au
Tue Jan 9 07:05:17 UTC 2007
On Tuesday 09 January 2007 14:13, mtyoung wrote:
> I recently added a new hard drive (/dev/sdb1)to a dual boot system. The
> new drive works fine from XP, but in Ubuntu I can only read. In XP I use
> "Ext2 IFS version 1.10c" to access the Ext3 drive.
> http://www.fs-driver.org/extendeddl.html
>
> The drive was formatted as NTFS originally, then changed to Ext3.
>
> Owner and Group are Root, Owner has all privileges, Group and Others can
> read and execute only.
>
> How do I change the permissions for a hard drive? Everything I find is
> for directories and files.
Easy :) First of all, I assume you're referring to the drive mounted
at /media/Ext2Docs200:
cd /media/Ext2Docs200
sudo chmod -R a+rw *
That gives EVERYONE on your system full read and write access to everything on
that drive.
Short answer, a hard drive is a file, just like basically everything else in
Linux/Unix. In fact your hard drive is /dev/sdb1 (which is a special type of
file called a block device). Once you mount the hard drive into the file
system (at /media/Ext2Docs200) you need to manage the files on that hard
drive as normal - IOW, with "chmod", "chgrp" and "chown".
FWIW, I'd advise changing the group to something other than "root". That way
you can allow access to users who are not part of the "root" group without
having to make it world-read/writeable. Something like this:
sudo groupadd docs
sudo gpasswd -a <your_UID> docs
sudo chgrp -R docs /media/Ext2Docs200
sudo chmod -R u+rw,g+rw,o-rwx /media/Ext2Docs200
Voila. Now you are a member of a new group "docs". The permissions on
the /media/Ext2Docs200 are:
Owner=root, full (RW) access
Group=docs, full (RW) access
Other= - , no access at all
Then to add permissions for other users, just add them to the "docs" group
with "gpasswd" in the same way as above. Have a read of "man chmod" as you
may want to make the group ID bit on the directories to force new files to
have a consistent group ownership. Here's a good permissions primer:
http://oldfield.wattle.id.au/luv/permissions.html
James
--
Quando um verdadeiro gênio aparece no mundo é logo reconhecido por este
sinal: os tolos ligam-se todos contra ele.
-- Jonathan Swift
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1349 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070109/c19de3be/attachment.bin>
More information about the ubuntu-users
mailing list