LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NTFS mounts; but I can't read it (https://www.linuxquestions.org/questions/linux-newbie-8/ntfs-mounts%3B-but-i-cant-read-it-460133/)

JulienPDX 07-01-2006 08:07 PM

NTFS mounts; but I can't read it
 
hi!

quick question. I can successfully mount NTFS volumes ( I have two external hard drives that use USB to connect).

FedoraCore5 sees it and mounts but I have to be in as root to read the files on there, how can I change that?

Thanks

DeusExLinux 07-01-2006 08:33 PM

How are you mounting them?

What are the contents of your /etc/fstab? As well as any other various good files.

JulienPDX 07-01-2006 11:56 PM

mounting
 
i'm mounting this drive by plugging it in. Its a USB external hard drive. The system auto-mounts it upon plug in; but i'm not able to read the contents unless i'm using a root file browsing process. I imagine this is prob. some security issue but how can i manually change the permissions of the volume?

And not just the volume; but all contents too. I have noticed that changing perms on a directory seems to not ever include contents,.

binary_y2k2 07-02-2006 12:15 AM

you need to edit /etc/fstab to include the option "user", eg
Code:

/dev/sda1 /mnt/sda1 auto ro,user,noauto 0 0
if sda1 is the usb device

And it's not a good idea to try to change permissions on a NTFS mount as 1st there is no write access and 2nd NTFS dosen't support linux file permissions.

JulienPDX 07-02-2006 02:27 AM

confused
 
i dont know if this matters; but i'm using fedora core 5.

When I ls the /mnt directory (as root) nothing shows up.

also, there is a file called /etc/fstab and i can open it in a text editor; but i don't see a reference to the device.

binary_y2k2 07-02-2006 02:34 AM

the /mnt dir can be replaced by any dir, it's just the mount point, if there is no reference to your usb HDD then you should add it in there using my example a a template.
you should look at "man fstab" and "man mount" especially the section on "Mount options for ntfs" in man mount.

JulienPDX 07-02-2006 02:49 AM

okay okay; i found out that indeed, the location of the device is dev/sda1 *as you said*; however if i add the line in my fstab as you suggested; the drive doens't show up when I reboot. I then unplug the drive and plug it back in and i get a message in Gnome indicating that I dont have priveleges to mount LACIE (the name of the external drive) grrr.

Nylex 07-02-2006 02:52 AM

It's not showing up when you reboot because of the noauto option. If you want it automatically mounted when you boot, then change "noauto" to "auto".

binary_y2k2 07-02-2006 02:54 AM

that's if it's always inserted, yes. if not you'll get a small error saying "/dev/sda1 not found..." or somethin like that :p

JulienPDX 07-02-2006 03:05 AM

still not working
 
if file is edited as stated:

/dev/sda1 /mnt/sda1 auto ro,user,noauto 0 0

drive doesn't show up on boot-up; gives me "don't have permissions to mount" error when unplugged and plugged back in; within gnome.

or

/dev/sda1 /mnt/sda1 auto ro,user,auto 0 0
during boot (before going into X); there is a line that says something to the effect of "attempting to mount other filesystems; /mnt/sda1 does not exist" drive won't show up on desktop in Gnome; unplugging and replugging it in gives me same error as above (no permission to mount)

If /dev/sda1 /mnt/sda1 auto ro,user,(no)auto 0 0 IS NOT included in fstab; drive shows up on gnome desktop upon bootup but can't be browsed.

jschiwal 07-02-2006 03:08 AM

Do you see a reference to "usbfs" or something similar in your /etc/fstab file. Your system may use a hotplug script, or UDEV to mount usb drives when they are plugged in. If you monitor the logs when inserting the usb drive, what message shows up: "sudo tail -f /var/log/messages".

Check for a /etc/udev/rules.d/ directory. Grep for "sd\*".
On my system, the rules are:
Code:

jschiwal@hpamd64:/etc/udev/rules.d> grep -n 'sd\*' *
60-persistent-storage.rules:23:KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x"
60-persistent-storage.rules:24:KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode"
60-persistent-storage.rules:25:KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode"
60-persistent-storage.rules:27:KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
85-mount-fstab.rules:2:SUBSYSTEM=="block", ACTION=="add", KERNEL=="sd*[0-9]|hd*[0-9]", RUN+="mount.sh"

Here are two LXer syndicated articles that have been featured on this site in the past.
http://www.linuxquestions.org/questi...highlight=udev
http://www.linuxquestions.org/questi...highlight=udev

If the device is created with the group ownership of "disk", a shortcut could be to make yourself a member of the "disk" group. However, I don't know whether this is a very proper way of doing it, or maybe even dangerous ( if /dev/sda has "disk" group ownership as well as /dev/sda1 ).

DeusExLinux 07-02-2006 11:23 AM

I had a similar problem, for some reason mounting an NFTS volume sometimes requires one extra append to the fstab file.

Try addign this to the end of your /dev/sda1 line:
Code:

umask=0222

JulienPDX 07-02-2006 02:37 PM

gave up
 
i gave up; none of those suggestions work for me, so what I started doing is this:

on one of my workspaces i always have a terminal window open; full screen.

I simply become su and then start nautilus in file browsing mode. I am able to read files there, so that is fine with me. Its just the external drive I used to save all my movies, music and documents from my windows installation so that I can see them while using Linux---which is a big need if I'm ever going to switch to this permanently :-)

This still doesn't make me want to go back to windows. <still enjoying the honeymoon) LOL

Btw, my sound card broke. (I had the tower plugged into my stereo and since the cable isn't very long, my tower was pulled out and on the floor so the cable could reach my stereo. I started cleaning my room and stupidly forgot it was still plugged in when I attempted to move it back to the desk. I set the tower on the edge of the bottom shelf of my desk and it kinda dropped and it bent the 3.5 plug while it was still plugged into the card. A big piece of the actual "ring" that the plug goes into *the green ring* then came off when I unplugged the cable. Now, any time I have any speaker plugged into the card; I have to jiggle it and hold it to make contact.

I was going to attempt to use super glue today--but, we have like a bunch of unopened soundblasters at work that we never used (exact same model as the one i've now had for 6 years-SBLive5.1) so I will probably just snag one of those. Also, my motherboard has onboard audio (that I had never used). So I simply took out the soundcard and then activated the onboard audio.

I was shocked and suprised and happy that my distro automatically detected this change and installed whatever driver was needed to use the onboard audio :-)))))

jschiwal 07-02-2006 03:03 PM

You may want to make yourself a member of the "wheel" group. Then run "visudo" and remove the "# " comment characters in the sudoers entry "# %wheel ALL=(ALL) ALL". This will allow you to run root commands like mount by preceding the commands with the command "sudo ".

In your /etc/fstab file, you can add an entry for your usb drive (/dev/sda1).
Do not use the option "auto". Your commputer will fail to boot if the usb drive isn't plugged in.
I would recommend that you either use the option "umask=0000" or make yourself the owner with the option "uid=<yourusername>". The "users" option will allow you to use umount or eject.

Here is the fstab entry for an ntfs partition on my laptop:
/dev/hda1 /windows/C ntfs ro,users,uid=jschiwal,gid=users,umask=0002,nls=utf8 0 0

For an external drive, I would add the option "noauto" to prevent the system from locking up when you boot up the computer. Use the uid and gid values for your own system. If you use them, you don't need the umask= option if you are the only user who needs access to the drive.


All times are GMT -5. The time now is 06:47 PM.