LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Requesting Help -- fstab, hdd partition mounting (https://www.linuxquestions.org/questions/linux-newbie-8/requesting-help-fstab-hdd-partition-mounting-508379/)

MBA Whore 12-07-2006 07:28 PM

Requesting Help -- fstab, hdd partition mounting
 
Hi everyone,

I have two (2) major issues / questions.

First, could someone explain to me what these Dynamic entries in my fstab mean:

/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,umask=0222 0 0
/dev/hda2 /mnt/hda2 auto noauto,users,exec 0 0
/dev/hda3 /mnt/hda3 ntfs noauto,users,exec,ro,umask=0222 0 0

hda1 is fine. . .no problems there.

Second, I was having trouble writing to hda2 and hda3. I think I figured out hda2, but hda3 is different.

Originally, I only had hda1 (NTFS) and hda2 (FAT32). However, I deleted hda2 (FAT32) and created two (2) new partions, which are hda2 and hda3 listed above. I formated hda2 in EXT3 and hda3 in NTFS.

I could mount both hda2 and hda3, but not write to them. I checked their permission setttings and for some reason, both were set to "root" (User: root and Group: root).

So, I went into KwikDisk as superuser and went into hda2. I changed the User to my username and the Group to users. After doing that, I could write to hda2.

hda3 is different for some reason. When I tried to change hda3 permissions, still as root, I got this message:

"Could not modify the ownership of file /mnt/hda3. You have insufficient access to the file to perform the change."

My options are to "skip file" and "cancel." I hit cancel. Now, how can I have insufficient access if I am root? Do I need to su and create a mkdir command for hda3 before I can write to it? I do not recall ever having to do that with a hdd partition before.

I welcome your thoughts and thank you for reading this long post!


FYI: I currently dual boot and hda is my Windows hdd (Linux is hdb, which is not an issue for this post).

JimBass 12-07-2006 07:57 PM

The reason is simple actually. Linux cannot at the present time, reliably write to NTFS partitions. Not even root can, plus the win partitons don't support linux based ownership.

There is support for fat32 writing, but NTFS has some projects out there working on it, but if you google enough, you'll find horror stories of people literally destroying all the data on an NTFS partition after they change one letter or symbol. That isn't a common reaction, but it can happen.

If you look at the unmask, you see that when mounted, linux takes the write permissions away from everyone. a permission of 7 indicates it can be read (4) written to (2) and executed (1). Those 3 numbers together add up to 7. They were picked because any combination of them lead to a different total, IE the only way to get 5 is to have read (4) and execute (1). In any case, the umask is the number removed from 7 when it is mounted. Both of your NTFS partitions have umasks of 222, which takes the write ability (2) away from all users.

Linux and windows can both write without 3rd party software to fat32 partitions. If you want to share data between linux and windows, it is best to use fat32.

Peace,
JimBass

MBA Whore 12-07-2006 08:45 PM

I had forgotten
 
JimBass:

I had forgotten about that. I remember a friend of mine said don't mess with using Linux to write to NTFS because you'll go insane. LOL.

Thanks for the refresher. Nice to know for once that the reason isn't because I screwed something up. LOL.

jschiwal 12-07-2006 08:51 PM

For fat32 partitions, the owner and permissions of files and directories are determined by the mount options.
For example you can use the options "uid=jimbass" to make jimbass the owner of the partition. You can have a single umask= entry to determine the permissions of all of the files and directories in the partition. You can instead use separate "fmask=" and "dmask=" entries to have files and directories have different permissions. You would want to do this is a fat32 partition is world writable. In that case make sure that files don't have "x" execute permissions. The "x" bit for directories have a different meaning, as they allow the user to enter a directory with the "x" bit set. Remember that the permissions for all of the files are the same and the permissions of all of the directories are the same.

MBA Whore 12-30-2006 03:40 PM

Considered resolved
 
I'll consider this resolved...thanks to all who helped.


All times are GMT -5. The time now is 05:38 PM.