LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting NTFS read-write (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-ntfs-read-write-82243/)

fredws 08-15-2003 08:51 AM

Mounting NTFS read-write
 
Can you mount a NTFS read-write?
I changed the fstab from ro to rw, but doesn't seem to make any difference. Do I have to reboot?

TIA,
Fred

Mathieu 08-15-2003 08:59 AM

Danger Will Robinson, Danger
 
:jawa: You are taking a big risk ...

NTFS support is Read-Only. :eek:
Do NOT write to NTFS from Linux. :tisk:
It may corrupt your NTFS filesystem. :cry:

m_yates 08-15-2003 09:02 AM

Check out this:

http://linux-ntfs.sourceforge.net/info/ntfs.html

You have to enable write support in the kernel I think. But it is listed as DANGEROUS when you run menuconfig for kernel configuration. I guess write support still doesn't work well. I haven't tried it myself. I have a Fat32 partition for sharing files between windows and linux.

Strike 08-15-2003 09:29 AM

Re: Danger Will Robinson, Danger
 
Quote:

Originally posted by Mathieu
:jawa: You are taking a big risk ...

NTFS support is Read-Only. :eek:
Do NOT write to NTFS from Linux. :tisk:
It may corrupt your NTFS filesystem. :cry:

In fact, I believe that you actually definitely WILL corrupt the filesystem if you do write to it. I remember reading somewhere that the NTFS write capability always (intentionally) corrupts the filesystem, but it tries to do so in a way that's easy to repair by the NTFS repair utility.

But yeah, in short, don't mount NTFS r/w.

fredws 08-15-2003 10:16 AM

OK, sounds like it would not be a good idea then.
The reason I was wanting to was because everything that I copy from the windows side is "read-only" and I have to do a chmod on the files each time. Is there an automatic way to do this?
Thanks!

Mathieu 08-15-2003 10:45 AM

If you are copying a directory, you can change the permissions of the directory and all of the files and sub-directories in it with the following syntax:
Code:

chmod -R 664 myDirectory
Or
you can always create a script which does a cp and then a chmod.

sorrodos 08-15-2003 10:59 AM

I believe changing the umask might do the trick for you. Try setting it to 027 by typing "umask 027" at the console.

fredws 08-15-2003 11:03 AM

so in the fstab, would that be umask= 0 2 7 ?

MasterC 08-15-2003 11:06 AM

No spaces though:
umask=027

I don't know whether this'll stick across the filesystems when copied though. And the 0 in that umask will not enable the write bit even though it'll essentially be creating a chmod of 7 (because of the above mentioned kernel compile requirement).

COol

sorrodos 08-15-2003 11:12 AM

Yeah, I didn't mean that it would enable write access to the NTFS volume, I meant it would make it so he doesn't have to change permissions when he copies files from the NTFS volume over to his Linux partition(s). I've never really used umask, was I correct about it?

fredws 08-15-2003 11:16 AM

Well, I changed it in the fstab to:
/dev/hdb1 /mnt/windows ntfs iocharset=iso8859-1,ro,umask=027

but the file is still read-only when I copy it to my home directory, do I need to do something to make the new fstab active?

sorrodos 08-15-2003 11:18 AM

Ummm you may need to reboot. I am sure there is a command to do what you are asking, but I don't know what it is, I only know a reboot would do it :)

And yes, that normally is the Windows way of doing things, but when you don't know the command to reinitialize something, why not just let the system do it for you? :)

MasterC 08-15-2003 11:26 AM

Nah, just ask ;)

mount -a -o remount
OR
umount /mnt/windoze
mount /mnt/windoze
To issue the remount command in 2 commands rather than one.

:)

And I don't know if it'll work either, but according to the umask, that is correct, but copying FROM windoze TO linux is a ball park I'm not all that familiar with.

OT:
SLC and WA eh? I'm in WA, and moving back to SLC :) I was originally from there. What part you from? Me, Glendale originally, moved to West Valley, went to Kennedy Junior High and Hunter High, graduated from Granite. Feel free to email me so we don't clog this guys thread (sorry for the temporary heist :) ).

Cool

fredws 08-15-2003 11:31 AM

OK, now I get "permission denied" when trying to move to /mnt/windows as a regular user. it has:
dr-xr-x--- 1 root root 12288 Aug 13 18:01 windows/

any ideas?

MasterC 08-15-2003 11:33 AM

Ah yeah, shoulda caught that, my bad.

It has been established (yet for unknown reasons) that you need a umask=000 for NTFS to work for simple read-only for users. The script idea sounds like the best solution at this point. That or an alias (alias might be better actually).

Cool

fredws 08-15-2003 11:47 AM

Alright then, I guess I will just continue to use chmod. I have most everything copied over from the "Dark Side" anyway, and after this last bug with windoze I don't think the machine will booted up to the windoze side again.

Thanks for all your help!

MasterC 08-15-2003 12:01 PM

Ok, good luck! And I'm glad to hear you are choosing the right side of the Force to Join Luke :D

Cool

VincentB 08-15-2003 12:55 PM

Hi all,

here is my fstab file. I mount NTFS partition in READ mode with no problem at all. Hope this can help.

/dev/hda5 /mnt/ntfs ntfs ro,umask=0222 0 0


Vincent

Skyline 08-15-2003 02:00 PM

Quote:

OK, now I get "permission denied" when trying to move to /mnt/windows as a regular user. it has:
dr-xr-x--- 1 root root 12288 Aug 13 18:01 windows/

any ideas?
One idea is simply to use your User ID number as one of the mount options in the 4th field - it gives you complete Ownership of the files and directories on your mounted partition - in coordination with a suitable umask value it normally does the trick.

In general - to get your uid number -

Open a command line shell - type

id username

(substitute username with whatever yours is)

Look for the

uid=xxx

Thats your username.

FlamingoJeff 08-16-2003 04:11 PM

Quote:

Originally posted by Skyline
One idea is simply to use your User ID number as one of the mount options in the 4th field - it gives you complete Ownership of the files and directories on your mounted partition - in coordination with a suitable umask value it normally does the trick.

In general - to get your uid number -

Open a command line shell - type

id username

(substitute username with whatever yours is)

Look for the

uid=xxx

Thats your username.

Thanks for that -- I've been yelling at RH9 for hours trying to get Samba and Win2K working, reading piles of documentation, oodles of web pages, tons of threads, etc...

and my workaround didn't work until this. Thanks again.


All times are GMT -5. The time now is 04:33 PM.