PDA

View Full Version : Give access to other users to the 2nd hard drive!



MNlinux
1st October 2006, 09:57 PM
I added a 2nd ide hard drive, its HDB. I made a link to /media/storage for the link. When I do a SU - and then a cd /media/storage, then ls -l I get that only root has access to it. How do I set that only my username robertp can get access to it as well? TIA :)

slackjack
1st October 2006, 10:06 PM
What file system is it? You can try mounting it like this:

mount /dev/hdb1 /media/storage -t fs_type -r -o umask=0222

The umask=0222 is important there. You can also add this like to your /etc/fstab file:

/dev/hdb1 /media/storage fd_type ro,user,umask=0222

Be sure to replace fs_type with the correct file system

MNlinux
1st October 2006, 10:19 PM
Its FC5, added second drive named storage, mounted and formatted my first drive! Just need to have everyone access it, robertp and root are the only two that need it. Thanks by the way!

slackjack
1st October 2006, 10:32 PM
Well you can add the second line above your /etc/fstab file. But for the filesystem (if formatted in ext2)m just replace fs_type with ext2. The user option will allow normal users to mount the device.
In additionm you can make the mount point (/media/storage) open to all by:

chmod 777 /media/storage
But adding the second line to your /etc/fstab fike should be enough. You can open and add the second line (as root) from the command line:

emacs /etc/fstab

MNlinux
2nd October 2006, 03:08 PM
Will that give them the ability to read and write on the drive? Like create folders and that stuff?

slackjack
2nd October 2006, 09:37 PM
Will that give them the ability to read and write on the drive? Like create folders and that stuff?

Yes it will.

MNlinux
7th October 2006, 12:28 AM
Yes it will.
Unfortunately it is not, I beleive it is a symbolic link, therefor the permissions do not stick. Even being logged in as root will not let me create folder on that hard drive. Any suggestions on how I can allow both root and a user to create and remove folders on the second hard drive HDB1?