Mailinglist Archive: opensuse (3441 mails)

< Previous Next >
Re: [opensuse] trying to figure out how to share a data drive
  • From: "Carlos E. R." <robin.listas@xxxxxxxxxxxxxx>
  • Date: Sat, 17 Jan 2009 23:30:39 +0100 (CET)
  • Message-id: <alpine.LSU.2.00.0901172145160.17253@xxxxxxxxxxxxxxxx>
Hash: SHA1

On Saturday, 2009-01-17 at 18:15 +0800, Joe Morris wrote:

On 01/17/2009 05:20 PM, George Olson wrote:

Ok, here is copied from my terminal window:

linux-8rby:~ # file -s /dev/sda2
/dev/sda2: x86 boot sector


I am pretty sure the D drive is NTFS, because I formatted it as that in
windows. But the response to the command was x86 boot sector, and I am
not quite sure what that means.

Curious, maybe "file" doesn't detect well ntfs partitions. [...] ah, it says the same for my vfat partition:

nimrodel:~ # file -s /dev/hda1
/dev/hda1: x86 boot sector

nimrodel:~ # file -s /dev/hda6
/dev/hda6: Linux rev 1.0 ext2 filesystem data (mounted or unclean)

Um, can you tell me kind of how to do that? Here are the contents of my
/etc/fstab file, copied from Kwrite:

/dev/disk/by-id/ata-ST9250827AS_5RG0CMC3-part1 /windows/C ntfs-3g
users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-ST9250827AS_5RG0CMC3-part2 /windows/D ntfs-3g
users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

OK, here is the problem. Change the 2 lines above (starting with /dev,
watch the word wrap) by changing the fmask and dmask values. dmask is
the directory permissions, fmask is the file permissions. If you only
want write access to your data partition, only change the second line.
They are written in octal, subtracting from the mask value of 111. So
zero, would mean 111, i.e read, write, execute. A mask of 022 would
give rwxr-xr-x. Make your mask 002, to give rwxrwxr-x. So change the
fmask and dmask to 002. To make the change immediately effective (so
you do not need to reboot), you would need to enter this command as
root, mount -o remount /Windows/D (and mount -o remount /Windows/C if
you also change it). The you should see that you have write access.
You could see that by ls -l /Windows/D, and it should be a bunch of
rwxrwxr-x. HTH.

You are probably right.

I use "fmask=0117,dmask=0007", which yields "-rw-rw----" for files and "drwxrwx---" for directories. I don't like files getting the executable flag.

- -- Cheers,
Carlos E. R.
Version: GnuPG v2.0.9 (GNU/Linux)

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >