Jump to content

Ownership and permissions for external HD


Guest favar
 Share

Recommended Posts

Guest favar

I am running Mandriva 2007 with an external WesternDigital 120 GB USB HD. The hard drive shows up

on the desktop devices but access is denied. Properties show the ownership as root and user access is read

only. I have tried chmod and chown on the /mnt/removable file with no results. Do I have to list this device

in the fstab file as sda1 much like I had to do for a zip drive some years ago? Any help, suggestions would be

very much appreciated. Apart from this problem I love the distribution.

Cheers..........favar

 

 

[moved from Software by spinynorman - welcome aboard :)]

Link to comment
Share on other sites

Hi favar,

 

presumed the mount point of your device is /mnt/removable, and favar is your user login, you could enter a terminal and do the following:

 

1. Change to root access (su, then password)

2. cd /mnt

3. chown -R favar\: removable

4. chmod -R u+r removable

 

HTH,

 

scoonma

Link to comment
Share on other sites

The other thing you could do, to save yourself from having to type all that in every time, is to edit your /etc/fstab (after backing it up, of course). I'm using a 120GB Buffalo, and the relevant line in my fstab looks like this:

 

/dev/sda5 /mnt/removable-2 vfat user,users,noauto,rw,noexec,nosuid,nodev,noatime,iocharset=utf8 0 0

As you can see, this mounts it to /mnt/removable-2 (I've got something else on /mnt/removable), allowing users to mount. Check out the man page for mount (man mount from the command line) for what the options mean. Then what I did was to put mount /mnt/removable-2 in my ~/.bash_profile, which mounts it automatically when I log in.

 

Hope this helps a little.

 

Alex

Link to comment
Share on other sites

Guest favar
Hi favar,

 

presumed the mount point of your device is /mnt/removable, and favar is your user login, you could enter a terminal and do the following:

 

1. Change to root access (su, then password)

2. cd /mnt

3. chown -R favar\: removable

4. chmod -R u+r removable

 

HTH,

 

scoonma

 

I'm sorry to say that this did not take care of the problem. Mounted properties still show root ownership.

Thanks..............favar

Link to comment
Share on other sites

Guest favar
The other thing you could do, to save yourself from having to type all that in every time, is to edit your /etc/fstab (after backing it up, of course). I'm using a 120GB Buffalo, and the relevant line in my fstab looks like this:

 

/dev/sda5 /mnt/removable-2 vfat user,users,noauto,rw,noexec,nosuid,nodev,noatime,iocharset=utf8 0 0

As you can see, this mounts it to /mnt/removable-2 (I've got something else on /mnt/removable), allowing users to mount. Check out the man page for mount (man mount from the command line) for what the options mean. Then what I did was to put mount /mnt/removable-2 in my ~/.bash_profile, which mounts it automatically when I log in.

 

Hope this helps a little.

 

Alex

 

I edited my fstab file to exactly what you quoted, Alex, but still no change. The HD is locked once mounted.

I did't change the ~/.bash_profile as I don't want the HD to mount at logon. Thanks for your inputs though as

I feel I may be getting closer to resolving this thing..........Cheers favar

Link to comment
Share on other sites

Guest favar
You do not need any fstab entry, on any modern distro. Just a couple of custom udev rules, or (most of the times) nothing at all to be entered by hand.

Is the drive NTFS formatted, or what?

 

I have been into the man udev which I didn't even know existed. I believe this is where it has to happen, but

writing up a line to change the ownership of a device leaves me cold. Pity that the man pages can't give

examples, but with the variables involved, I can understand. Would you recommend my removing the fstab entry

and work on udev rules? (once I understand them better)......Yes to your question above, the drive is ntfs.

Thanks for pointing me the right direction, now to some studying.

Cheers..........favar

Link to comment
Share on other sites

Argh... Oh well, it (apparently) works, so I'm happy :D

 

So, is the happy man's external drive NTFS, or not?

Alas, I fear not. Sorry for muddying the waters. That'll teach me for having my brain still set to "stunned" when I type something...

 

Also, favar, I didn't mention that my fstab looks like that because my HDD happens to be at /dev/sda5. Yours might be somewhere else. However, I don't have any experience with NTFS in Linux, so you are probably better off listening to the advice of someone more knowledgeable.

Edited by alexpank
Link to comment
Share on other sites

A couple of quick tips:

1. Install ntfs-3g driver, either from your distro repos or from oficial source:

http://www.ntfs-3g.org/

2. Install "ntfs-config" either from repo or from here:

http://flomertens.free.fr/ntfs-config/

3. Run "ntfs-config" as root ( kdesu ntfs-config ) and pick your prefs in there (there's just a couple of them).

 

No need to reboot... just unmount all ntfs partitions you have, and remount. No need to change fstab, this has already been done for you- just checkout if something strange was written there. You can remove all references to removable disks, they are definitely not needed.

Now you can read AND write safely to any NTFS partition, and all removable ntfs disks can be mounted by user as read/write (unless you have set some paranoid system security level).

Edited by scarecrow
Link to comment
Share on other sites

Guest favar
Remove the line in fstab for sda5 that you created.

 

Check your security level per my post in this thread:

 

https://mandrivausers.org/index.php?showtop...amp;hl=security

 

Try resetting your security to "Standard" and rebooting. That seemed to do the trick in the above thread.

My line in fstab was writen for sda1 and the security was set for standard on installation.

Do you recommend I remove the fstab line altogether, i.e. I dont need anything in the fstab file..

Link to comment
Share on other sites

Guest favar
A couple of quick tips:

1. Install ntfs-3g driver, either from your distro repos or from oficial source:

http://www.ntfs-3g.org/

2. Install "ntfs-config" either from repo or from here:

http://flomertens.free.fr/ntfs-config/

3. Run "ntfs-config" as root ( kdesu ntfs-config ) and pick your prefs in there (there's just a couple of them).

 

No need to reboot... just unmount all ntfs partitions you have, and remount. No need to change fstab, this has already been done for you- just checkout if something strange was written there. You can remove all references to removable disks, they are definitely not needed.

Now you can read AND write safely to any NTFS partition, and all removable ntfs disks can be mounted by user as read/write (unless you have set some paranoid system security level).

_______________________

Thank you Scarecrow, we are getting closer. I downloaded and installed the FUSE as req'd and attempted to install ntfs-config. Installationed fail for the lack of 4 files in PACKAGE. This Package didn't come with the tarball and they are not in the development sofware of Mandriva. Where to

go next is the question. I shall forge ahead with whatever help I can find. Cheers............favar

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...