Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access is denied to a slave HD

Status
Not open for further replies.

dragonforce

Technical User
Dec 27, 2006
34
0
0
ZA
I cannot write or remove data off a slave drive ive installed on SuSe 9.2. Ive configured it and created the partion and MKFS. I have to be root to access it. How can I set permissions on a hard drive?? Would the permissions matter if the folder where I mount the drive to hasnt got permissions made for a normal user??

/*******************************

DragonForce
-Is it wrong to be strong
*******************************/
 
Are you mounting it using fstab or manually mounting it?
What is the drive formatted as?
What permissions are given to the root of the filesystem on the drive?
What are the permissions on the mount point?
What are the permissions on the device file?

As the user try:
Code:
mkdir ~/mntdrive
mount /dev/hdb0 ~/mntdrive

And/Or edit your fstab to automount it:
Code:
/dev/hdb0 /mnt/hdb0 ext3 auto 1 1
Part by part that's
/dev/hdb0 the drive, you'll know what /dev it is-- I just guessed that it was a IDE drive with one partion which could be either hdb0 or hdb1.

/mnt/hdb0 is the mount point -- you may want to create a better mount location than OS defaults. I assumed the defaults and the same assumption for what the device is.

ext3 is the file type, if you used fat, ext2, raiser ... then specify it the way you would after the [red]-t[/red] in the mount command

auto means automatically mount at boot, and will use the defaults so it'll act like / does... If this doesn't work, you may want to try user.

1 1 are dump and fsck.
Dump as 1 means to backup the drive using dump periodically. You may wish to make this 0 depending on your system.
Fsck will run fsck on boot when the drive when the filesystem requests it. You know those boot messages "You've gone 30000 without rebooting or running fsck... Checking file system..."

More info:

[plug=shameless]
[/plug]
 
Yip; using fstab. When I boot up it mounts automatically. How would one check or set permissions for the /dev/hdb1. It is a IDE and has only one partion /hdb1. its a reiser/ext 3 filesystem. Cant remember which one. its mounted as /data in the root / directory.

/*******************************

DragonForce
-Is it wrong to be strong
*******************************/
 
What is the exact error you get when trying to read/write to it as a user? Does it show up in [red]du -h[/red]

First, mount the drive and change permissions to allow unfettered reading/writing/execting, so assuming your in your user account at the commandline:
Code:
su -
#type password
mount /dev/hdb1 /mnt/hdb1
chmod 777 /mnt/hdb1
umount /mnt/hdb1
exit
mount /dev/hdb1 /mnt/hdb1
touch /mnt/hdb1/testfile.txt
ls /mnt/hdb1

If the testfile.txt is created, life is good, but reboot to be sure.

If not, check the permissions on the mount point, and make them 777 also, test.

If that doesn't work, then try changing auto or default to user in the fstab, test.

If that doesn't do the trick post with a copy of the fstab.

[plug=shameless]
[/plug]
 
I'll set the permissions for the mount point. Dont you have to set it before you mount the drive?? Im sure its only permissions. If not I'll post the fstab.

Thanks

/*******************************

DragonForce
-Is it wrong to be strong
*******************************/
 
it is working now. It was the mount point. Thanks

/*******************************

DragonForce
-Is it wrong to be strong
*******************************/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top