LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   user file permissions for windows partitions (https://www.linuxquestions.org/questions/mandriva-30/user-file-permissions-for-windows-partitions-175125/)

Alfanut 04-27-2004 10:15 AM

user file permissions for windows partitions
 
So far, I installed various Linux distributions while Windows was active on one or more of the three hard drives in my box. Windows partitions showed on the user's desktop and were readily accessible.

Now, to keep further MBR/Boot Loader problems to a minimum, I disabled the Windows drive and installed Mandrake 9.2 on a fresh drive. (No other drives enabled at time of install.)

Then, leaving Mandrake 9.2 (hda) as primary master, I enabled the second drive (Win98SE) and the third (Mandrake 9.1). During boot, Mandrake 9.2 found the new drives and added them to fstab properly.

I also modified LILO to successfully boot Win98SE and that works fine.

But, only root can access the other two drives, the user can not. User "permission denied" even though the other partitions are mounted.

To move the various files from Win98SE and Mandrake 9.1, root must do so, then change all file permission before the normal user can access them.

It works but I'm sure that, with another simple modification, I can restore user access to those other two drives.

And that's where my experience fails me.

Any help will be appreciated.

chii-chan 04-27-2004 01:15 PM

You have to change the permission in fstab file like this:

/dev/hda5 /win/part1 vfat defaults,uid=500,gid=500,umask=0022 0 0

Search for mounting windows/vfat partition bcs this thing has been asked many times though.;)

Alfanut 04-27-2004 05:43 PM

Problem Solved!
 
Chii-chan: Thanks for your reply. There are still a few strange nuances in Linux that I may never completely understand.

I thought I'd try the "supermount" option on one of my Windows partitions and that worked! Then, I simply changed fstab and mtab to read the same for all five windows partitions and now all are readily accessible to the primary user (500). Here are the two entries for the Windows C Drive which did the trick:

(fstab) none /mnt/win_c supermount dev=/dev/hdb1, fs=vfat,- -, user 0 0

(mtab) none /mnt/win_c supermount rw,noexec,nosuid,nodev,dev=/dev/hdb1,fs=vfat,- - 0 0

So far, I see no drawbacks to using this option; however, if anyone has a better idea or a reason for not using this "supermount" method, I'd obviously be glad to learn. Thanks!

aaa 04-27-2004 05:49 PM

A drawback would be that it's not neccesary. You could be wasting some resources for automatic mounting when it's not needed (supermount's for removable stuff). But if you find it easier...

Alfanut 04-27-2004 06:30 PM

Thanks for that, too, aaa! No, I don't find it easier but nothing else seemed to work for me, not even the suggestion above.

So, what's the answer? Unmount those windows drives when there's no need for ready access?

I'm heavily involved in sim racing (racer.nl) and still working on converting various car and track models to work in Linux. Needless to say, there are some rather large archives there with subdirectories and it's rather a PITN to have to move them as root, then sit there and change file permissions.

Advice is very much appreciated! Thanks!

aaa 04-27-2004 06:49 PM

Just noticed the 'umask=0022' posted earlier. Try this line:
Code:

/dev/hdb1 /mnt/win_c vfat defaults,uid=[insert your user name here],umask=0022 0 0
Or
Code:

/dev/hdb1 /mnt/win_c vfat umask=0,defaults 0 0
The first let's only your regular user have write access. The second lets everyone have write. I'm guessing it didn't work the first time because your user ID number isn't 500. You can also put the username in place of the number.

This will mount automatically on bootup, and stay mounted the whole time.

Alfanut 04-27-2004 08:24 PM

aaa: Neither option works. That supermount appears to be my only choice. Unless, of course, the info in mtab interferes with the choices you cited above.

Currently, my mtab contains the same data as I indicated above for all five partitions.

I changed two of the partition lines per your advice and those two partitions were then only accessible to root.

I know for a fact that my earlier installation of MDK 9.2 did not give me these problems but, regrettably, that installation shared its drive with 98 until I managed to screw it up to the point where I just reformatted the entire drive and reinstalled this current version of MDK 9.2. I've saved sample XF86config files for years but wish now that I had had the forsight to save fstab and mtab file examples as well. We live and learn, hopefully.

All patches and updates are installed and everything seems to work. Win98SE is on another drive altogether and is accessible via that 'supermount' option. I would have saved myself all this trouble had I left the Windows drive active when reinstalling MDK9.2. I did not. This, only to see what happens.

I guess I know, eh? Thanks for the help, again; I appreciate that there are people who are willing to deal with such mundane matters as this. Cheers!


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