LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-26-2003, 02:29 PM   #16
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Rep: Reputation: 16

I don't thing you will be able to write to a NTFS partition

The line freychef posted for your fstab file

/dev/hda1 /windows ntfs defaults,ro,gid=windows,umask=002 0 0

it's for a read only NTFS partition (notice the "ro")

I'm not sure but I think current linux kernel doesn't support writting on a NTFS partition. You would have to convert it to fat32 first


The line Edward posted it's for you to add to your fstab file. And it should work if your windows drive is on a fat32 partition.
 
Old 10-26-2003, 02:33 PM   #17
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Rep: Reputation: 16
Quote:
Originally posted by doralsoral
i didnt have to add anythign to fstab the script just did it everytime i starte dup

But that script only runs when the X server starts right? What if you want to have it running even in text mode?
 
Old 10-26-2003, 04:06 PM   #18
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
the correct way to do it (atleast to me it seems correct) would be to put the line in fstab. I think the 2.5 kernel supports writing to NTFS but it says EXPERIMENTAL and could mess up the drive (highly not recommended).

Try using /etc/fstab rather than creating an extra script for mounting a drive. If you dont want the drive mounted all the time you can add the noauto option to /etc/fstab and mount manually by typing:

#mount /mnt/windows or (changing the /mnt/windows part to where you have it mouting in fstab)
 
Old 10-26-2003, 04:24 PM   #19
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I have to agree with Robert0380, why bother to write a script and put it in your init section when all you have to do is add 1 line to fstab (the same line you wouls have to add in your script basically )

ch4s3r:
Is your windows partition vfat or ntfs? That is going to make the difference of what you add to fstab. As mentioned ntfs is stable only as read only...

Use a line like this:
/dev/hdb1 /mnt/data vfat defaults 00
but change '/dev/hdb1' to the HD partition where your windows is,
and '/mnt/data' to where you want to access windows in your linux filesystem (make sure the directory exists or you will get an error!),
and change 'vfat' to 'ntfs' if applicable. If you are using ntfs then you will want to change 'defaults' to 'ro'
 
Old 10-26-2003, 05:17 PM   #20
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Rep: Reputation: 16
Since we're on the subject, how come only I can only write to my windows partition if I'm root? I've tried the uid,gid, user and users options but no luck
 
Old 10-27-2003, 09:10 AM   #21
ch4s3r
Member
 
Registered: Sep 2003
Posts: 97

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bulliver

Use a line like this:
/dev/hdb1 /mnt/data vfat defaults 00
but change '/dev/hdb1' to the HD partition where your windows is,
and '/mnt/data' to where you want to access windows in your linux filesystem (make sure the directory exists or you will get an error!),
and change 'vfat' to 'ntfs' if applicable. If you are using ntfs then you will want to change 'defaults' to 'ro'
I have a fat32 on my windows hd, but where do i put that line in? i tried in console mount -a /dev/hda1 /mnt/windows vfat defaults 00 and it just gives me the help menu for mounting.
 
Old 10-27-2003, 10:39 AM   #22
Uchiha sasuke
LQ Newbie
 
Registered: Oct 2003
Posts: 21

Rep: Reputation: 15
put it in /etc/fstable <--- use editor to add that line in , if you atr not so sure , just cat it before editing it .
luck
 
Old 10-27-2003, 04:36 PM   #23
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I think Uchiha sasuke meant /etc/fstab

You will see several similar lines in this file, so just add your new line at the bottom.

/etc/fstab is the file that declares which partitions will be mounted and where they will be mounted at boot time.

If you really want to get to know fstab you can run the command 'man fstab' but it might still be a bit over your head at this time. It will explain what all the fields represent.
 
Old 10-27-2003, 09:59 PM   #24
ch4s3r
Member
 
Registered: Sep 2003
Posts: 97

Original Poster
Rep: Reputation: 15
thank you all very much, i ultimately decided to add the line to fstab, it works well. again thanks
 
Old 10-27-2003, 11:55 PM   #25
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Quote:
Originally posted by Covel
Since we're on the subject, how come only I can only write to my windows partition if I'm root? I've tried the uid,gid, user and users options but no luck
need to add the umask override option in your windows partitions line in fstab. depending on how you want to secure your windows partition and who you want to give write permissions to on that partition will determine what gid and umask combination you want. for instance...

/dev/hda1 /mnt/c vfat auto,owner,gid=windows,umask=0002,exec,rw 0 0

tells you that when this partition is mounted it is owned by user root and group windows. the umask starting from the second 0 (002) means that the partition will be mounted the permissions rwx-rwx-r-x meaning that only the owner (root) and anyone in the group windows can write to that partition (while everyone - root, users in the windows group, and other can read and exec). all others have only read and exec permission. this let's you specify a select group of users who has full permissions on that partition. you'll need to create the group windows and add the users you want to have full permission to that group.

if you don't care and want everyone and their mother accessing your computer to have full permissions on that partition, then you only need to add the umask option with no gid.

/dev/hda1 /mnt/c vfat auto,owner,umask=0000,ecec,rw 0 0

i personally go with the first way on all my windows partitions, as it is more secure that way and helps to prevent joe schmoe who just happens to have access to my computer from doing something like deleting my system.ini or win.ini, etc... actually i'm even more paranoid about my c:\ drive since it's a win9X-ME install with outlook/oe passwords, profile passwords, etc. (win9X-ME passwords are easily cracked). i don't even let others read or exec permissions. so my windows partitions in fstab look something like this:

/dev/hda1 /mnt/c vfat auto,owner,gid=windows,umask=0007,exec,rw 0 0
/dev/hda5 /mnt/d vfat auto,owner,gid=windows,umask=0002,exec,rw 0 0

umask=0007 leaves a mount permissions of rwx - rwx - ---

remember how the umask values correspond to chmod values.

Code:
umask     chmod
-----    --------
0         7 - rwx
2         5 - r-x
7         0 - ---
also remember that after changing your fstab, you need to unmount the partition and remount it using the umount and mount commands.

Last edited by megaspaz; 10-27-2003 at 11:57 PM.
 
Old 05-21-2004, 09:07 AM   #26
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Rep: Reputation: 16
I know this thread is old but I never had the chance to thank you...

Thanks megaspaz. It works fine now!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CDrom mounts but doesn't do anything else stuffedcat Linux - Newbie 13 05-21-2005 11:07 AM
samba mounts ? linuxsurd Linux - Networking 1 02-07-2005 10:28 AM
cd mounts Murph00009 Linux - Hardware 1 01-07-2005 10:57 PM
My / directory only mounts ro cruxx Linux - General 5 08-17-2004 02:33 AM
some help with x and mounts sehris Slackware 4 08-12-2003 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration