LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Making a hard drive only writable to certain users, ro to everyone else. (http://www.linuxquestions.org/questions/linux-software-2/making-a-hard-drive-only-writable-to-certain-users-ro-to-everyone-else-326024/)

jon_k 05-22-2005 04:02 PM

Making a hard drive only writable to certain users, ro to everyone else.
 
Ive got a new HDD I put in for storage,and I want user jon_k to have read/write access, and everyone else to have only readonly.

Any ideas on how I can do it?

CoolAJ86 05-22-2005 05:06 PM

use groups?

Code:

groupadd driveusers
gpasswd -a username driveusers
chown root:driveusers /dev/newdrive (edit some udev file for this to be permanent)
chmod g+rw /dev/newdrive
mkdir /mnt/newdrive
chown root:driveusers /mnt/newdrive
chmod g+rw /mnt/newdrive
mount /dev/newdrive /mnt/newdrive


jon_k 05-23-2005 01:58 AM

One part of your instructions I don't understand:

chown root:driveusers /dev/newdrive (edit some udev file for this to be permanent)

Which udev file? Where is it?

CoolAJ86 05-23-2005 05:42 AM

That's the part that I'm not familiar with and that you'll have to google for. It's the fun part!

Read the man page - that will tell you where the files are and what exactly to do. I'll give you this hint: /etc/udev/permissions.d/ seems to be the right place to start on my system.

YMMV.


All times are GMT -5. The time now is 04:19 AM.