LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/fstab NTFS filesystem (https://www.linuxquestions.org/questions/linux-newbie-8/etc-fstab-ntfs-filesystem-286999/)

boyd98 02-06-2005 02:54 PM

/etc/fstab NTFS filesystem
 
Debian Woody OS.


Have some general questions about fstab file.
Here is mine as follows


# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext2 errors=remount-ro 0 1
/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
/dev/hdc1 /mnt/data1 ntfs ro,umask=0277,uid=mario,gid=mario 0 0
/dev/hdc5 /mnt/data2 ntfs ro,umask=0277,uid=mario,gid=mario 0 0
/dev/hdc6 /mnt/data3 ntfs ro,umask=0277,uid=mario,gid=mario 0 0



I added the last three lines to auto mount my NTFS partions , per the following FAQ (http://linux-ntfs.sourceforge.net/info/ntfs.html#4.9)

My question is why (or do I need to) use the read only option when I am specifying umask. My objective is only to have the user mario and root be able to access this file system. mario is part of the group mario. Is my syntax correct?

I have also read in the debian man pages for mount, that the uid, and gid have no use. But following that above tutorial, it seems necessary to mount my NTFS partion so only mario has access. I am correct?


Thx in advance,

Boyd

Ace07 02-06-2005 06:10 PM

Re: /etc/fstab NTFS filesystem
 
uid= USER ID
gid= GROUP ID

This should be an integer hopefully. This option (or the 'users' option) needs to be specificed if you want to be able to access it from your regular old user account. Why you ask?

Well when you mount something, you need to use root, so it automatically assigns the ownership to the user mounting it. You don't need the group ID unless you have more than one user accessing the drives.

(uid=mario shouldn't work, it requires an actual user number)
Use:

# id -u mario

To find the actual ID of the user mario.

boyd98 02-06-2005 06:21 PM

Thx for the feedback.


My biggest question is how should the syntax look, to reach my objective of mounting the ntfs partition and only allowing root or user mario access.


The mount command actually works with the uid=mario, i have since changed it to the uid=#, to clean it up.


After investigating further it seems as if, all I need to have for my options are,

mount /dev/hdc1 /mnt/data1 -t ntfs -o umask=377,uid=<#>


this will allow user only read access. Does that seem correct to you? Or should I include some other parameters?


My second question is, I want to have this drive (NTFS) in my linux box so it can act as a file server. I will want to add more data to these partitions. Am I SOL, because I have recently read that linux does not have NTFS write support (you can write, but its not safe?). Is this correct?

dimi 02-06-2005 07:25 PM

Before u can write to a NTFS file system u need ur kernel to support that. In the kernel under file systems there is an option where u can enable NTFS write support. It says it is not safe to write to a ntfs file system and i haven't tried to confirm how it works. But u will need to enable NTFS write support if u are do go anywhere with writing to ur mounted ntfs drives.

Good luck
D

chrism01 02-06-2005 11:48 PM

AFAIK, NTFS write is still "EXPERMENTAL", so make sure you have backups .... :)


All times are GMT -5. The time now is 02:54 PM.