Want automatic full R/W rights to NTFS drives

I am using 12.1 which was installed on a sata drive while my 2 Windows sata drives were disconnected, as i did not want the boot changed on the Windows OS drive, and would rather just use the keyboard option to choose which drive to boot from (F8 key on this Sony PC, while most others seem to be F12) at boot.

I understand that OpenSuse by default does not give full R/W rights to such as part of the level of security it enables, but i want it to auto mount and give full R/W rights. Besides wanting more speed, presently LibreOffice cannot save files to those drives.

Here are all the drives via the sudo /sbin/fdisk -l command:

/dev/sdb1 * 2048 81326079 40662016 f W95 Ext’d (LBA)
/dev/sdb2 81326080 160086015 39379968 7 HPFS/NTFS/exFAT
/dev/sdb5 4096 4208639 2102272 82 Linux swap / Solaris
/dev/sdb6 4210688 35053567 15421440 83 Linux
/dev/sdb7 35055616 81326079 23135232 83 Linux

I I did some research on this, and read here HowTo Mount NTFS Filesystem Partition Read Write Access in openSUSE that i need to add these drives to the fstab file, but it is not clear enough to me just how, as i do not want to bork the boot, though i do have a backup file. Here is the present ftab file:

dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part7 /home ext4 defaults 1 2
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part2 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/usb-ADATA_USB_Flash_Drive_12109090614802D9-0:0-part1 /windows/D vfat users,gid=users,umask=0002,utf8=true,nofail 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

I understand i should change the end of the next to last entry (6L080M0_L23WQ79G-part2 /windows/C) from users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 to defaults,locale=en_US.UTF-8 (leaving to the two greyed out zeros alone i guess), but what lines should i precisely add after the ADATA_USB_Flash_Drive:

Or is there a way to just right click on the drive and change permissions (as you would think)? I did try but the file manager superuser just hangs.

Thanks.

Or is there a way to just right click on the drive and change permissions (as you would think)? I did try but the file manager superuser just hangs.

No you would need to umount and then mount again.

OK line 4 is as you say line 5 I think is just change
gid=user, umask
to
default

as long as you don’t change the first 3 lines or the last 4 it should boot just fine. at worst the Windows wont mount

BTW after the changes you can type (as root) mount all

this will remount all in the fstab file and save you from rebooting as a test.

To give full read/write to all Linux users, modify the /etc/fstab file as root and make the following changes:

/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part5                    swap       swap    defaults       0 0
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part6                    /          ext4    acl,user_xattr 1 1
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part7                    /home      ext4    defaults       1 2
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part2                    /windows/C ntfs-3g **defaults**       0 0
/dev/disk/by-id/usb-ADATA_USB_Flash_Drive_12109090614802D9-0:0-part1 /windows/D vfat   ** defaults**       0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

After you make a change, you must restart your PC for them to take effect after you have made an edit. Other choices exists, but a restart is the most simplest way to go for new users. To add anything new to fstab file I suggest you use the YaST Partitioner. You would select an existing Partition and chose to edit it. You will NOT FORMAT it, but elect to mount it and to give a folder name to mount it to. For instance, you already have /windows/C & /windows/D and you could have a /windows/E or really any folder name not already being used. If the folder does not exist, it will be created. You then edit the fstab file as root and change the settings to defaults.

Thank You,

Thanks, but i do not see the /dev/sdb1 /dev/sdb2 drives in your new fstab config. I am not looking to give all users full rights, just me (the default user, and not just root) Right now the Linux drives are fine, but there is a NTFS partition on it (6L080M0_L23WQ79G-part2 /windows/C) which i think i can change as described to to defaults,locale=en_US.UTF-8, but i want to add the other 2 NTFS drives to fstab to give me R/W rights. It is not clear why i need to give these drives a folder or what i should add to fstab if i do. Couldn’t i add something like

sdb1 /media/<mount point> ntfs-3g defaults,user,locale=en_US.utf8 0 0

sdb2 /media/<mount point> ntfs-3g defaults,user,locale=en_US.utf8 0 0

When i do use the Yast partitioner and r/ clk. to edit it then it offers 3 options under mount point. /srv /tpm and /local and i do know which to choose.

One web page (MountingWindowsPartitions - Community Help Wiki), says to use the NTFS Configuration Tool (under Gnome), and i did think that by now there would be an easier and safer way to simply get rights to your own drives, but maybe not in all distros or desktops.

Thanks again for your patience and help.

On 2012-05-15 00:06, Acts1036 wrote:

> I am not looking to give all users full rights, just me (the
> default user, and not just root)

Do you want write permissions on the windows disks limited to one user?

> It is not clear why i need to give these
> drives a folder

because it works that way. :slight_smile:

> or what i should add to fstab if i do. Couldn’t i add
> something like
>
> sdb1 /media/<mount point> ntfs-3g defaults,user,locale=en_US.utf8 0 0

No. Do not use /media for your things.

> When i do use the Yast partitioner and r/ clk. to edit it then it
> offers 3 options under mount point. /srv /tpm and /local and i do know
> which to choose.

Write it. You can write “/windows/C” etc. (D, E, F…)


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I would like it to be limited to one user, but whatever is easiest.

I presumed you could not write in that dialog, but you are right, you can. But it also asks, "mountable by user and i put yes. I also choose to mount by name (nothing finalized) Then it has Arbitrary option value as users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 Is this what i want?
Thanks

It was my suggestions to run the program YaST / System / Partitioner (The order If you use KDE) and in the Partitioner I said:

You would select an existing Partition and chose to edit it. You will NOT FORMAT it, but elect to mount it and to give a folder name to mount it to. For instance, you already have /windows/C & /windows/D and you could have a /windows/E or really any folder name not already being used. If the folder does not exist, it will be created. You then edit the fstab file as root and change the settings to defaults.

I can’t exactly give you the exact entry in your fstab file as shown; you are using disk/by-id which is recommended as you can move what port a drive is connected to and it will still work from your fstab file as it has the same disk/by-id name. You could switch to the /dev/sdb1 or sdb2, but you don’t need to when you use the Partitioner. Further, I don’t know what folder name you want to mount these new partitions to. The folder must exist before it can be mounted in your fstab file but the YaST Partitioner will create it for you if it does not exist. I suggest you run the utility and come back and ask questions if you have any.

Thank You,

On 2012-05-15 01:16, Acts1036 wrote:

> I would like it to be limited to one user, but whatever is easiest.

Easiest is “default”, but one user is possible.

> I presumed you could not write in that dialog, but you are right, you
> can. But it also asks, "mountable by user and i put yes. I also choose
> to mount by name (nothing finalized) Then it has Arbitrary option value
> as users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 Is this what i
> want?

You want to add “uid=username”.
You can also adjust fmask and dmask to finetune who has access. I use
“fmask=0117,dmask=0007”, but that would not be for you.

I copy from my notes:

> gid makes no sense if a user mounts it, ignored.
>
> #umask=0002
> #
> # A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Any omitted digits are assumed to be leading zeros. The first digit
> # selects the set user ID (4) and set group ID (2) and sticky (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute
> # (1); the third selects permissions for other users in the file’s group, with the same values; and the fourth for other users not in the file’s group, with the same values.
>
> #
> # He descubierto en /usr/src/linux/Documentation/filesystems/ntfs.txt que no solamente existe umask, sino también fmask y dmask
>
> #
> # fmask=0113,dmask=0022 genera estos permisos
> # -rw-rw-r-- ficheros
> # drwxr-xr-x directorios/
> #
> # fmask=0117,dmask=0027
> # -rw-rw---- ficheros
> # drwxr-x— directorios/
>
> # Octal permissions (man chmod):
> # UserID * 4 + GroupID * 2 + sticky * 1
> # Read * 4 + Write * 2 + Execute * 1 ( owner )
> # Read * 4 + Write * 2 + Execute * 1 ( group )
> # Read * 4 + Write * 2 + Execute * 1 ( rest )

One thing more, if all this confuses you: take things one step at a time,
but do get your hands dirty :slight_smile:

You can do few things in Linux if you do not get to the bottom of things,
using the terminal, edit files, touch things. Do not expect to always have
a mouse interface to things, they come later and are limited in power.

Meaning: in this case, to test a setting, do:

umount the partition
edit fstab
mount the partition again
test the changes.

Do not use yast partitioner, except the first time if you need it.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

So i should still use the yast partitioner this time, and should i check “mountable by user” option? And will this do anything physical to my Windows drive that would negatively affect it? I did not check format.

Carlos, the YaST Partitioner works just fine and while you can suggest you not use it, as your opinion, that’s all it is and there would need to be a more detailed way to do it from Terminal. I have no problem using the YaST Partitioner as it can do just about every task required to use openSUSE. Lets not make absolute statements without adding in its your opinion to not use or do something. And, its OK to have such an opinion and express so, just keep it in context.

Thank You,

On 2012-05-15 02:03, Carlos E. R. wrote:
> You want to add “uid=username”.

I forgot. I believe “username” works, but if it doesn’t, you need the UID
number. You find it in /etc/passwd.

Something else:

Do not reboot to activate changes in fstab, because if there is a bad
mistake the booting will halt and leave you in rescue mode, baffled. Better
test the changes before reboot.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-05-15 02:26, jdmcdaniel3 wrote:

> Carlos, the YaST Partitioner works just fine and while you can suggest
> you not use it, as your opinion, that’s all it is and there would need
> to be a more detailed way to do it from Terminal. I have no problem
> using the YaST Partitioner as it can do just about every task required
> to use openSUSE. Lets not make absolute statements without adding in
> its your opinion to not use or do something. And, its OK to have such
> an opinion and express so, just keep it in context.

Of course, everything I say is in my opinion, just as everything you say is
in your opinion :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

It is my opinion that you are both to the thanked for your opinions;)

Now i used Yast PM, and now fstab says (edited 9:13),

/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part7 /home ext4 defaults 1 2
/dev/sdb2 /Storage ntfs-3g user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/usb-ADATA_USB_Flash_Drive_12109090614802D9-0:0-part1 /windows/D vfat users,gid=users,umask=0002,utf8=true,nofail 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/sda1 /WinAS ntfs-3g user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/sdc6 /WinF ntfs-3g user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/sdc5 /WinH ntfs-3g user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

What should be done to give full RW to at least the main user. And how should i test this before i reboot? Thanks again

On 2012-05-15 02:26, Acts1036 wrote:
>
> So i should still use the yast partitioner this time, and should i check
> “mountable by user” option? And will this do anything physical to my
> Windows drive that would negatively affect it? I did not check format.

Use whatever you want and prefer. Although I believe you should eventually
learn to do this without it.

Mountable by user? Ok, no problem. This means that a plain user will be
able to mount those partitions, not only root. It has a side effect: if
user “john” mounts a windows partition, all files will be assigned to him,
unless you defined the entry “user=somebodyelse”.

No, mounting a partition does nothing bad to it. You can also mount it
“ro”, and then nobody can write to it.

Always when you use the yast partitioner to mount devices you have to be
careful not to delete partitions, not to format anything. Notice there is a
message when you start it with a big warning: be careful. It is a very
powerful tool, can also do damage if misused.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On Tue, 15 May 2012 06:13:06 +0530, Carlos E. R.
<robin_listas@no-mx.forums.opensuse.org> wrote:

> On 2012-05-15 02:26, jdmcdaniel3 wrote:
>
>> Carlos, the YaST Partitioner works just fine and while you can suggest
>> you not use it, as your opinion, that’s all it is and there would need
>> to be a more detailed way to do it from Terminal. I have no problem
>> using the YaST Partitioner as it can do just about every task required
>> to use openSUSE. Lets not make absolute statements without adding in
>> its your opinion to not use or do something. And, its OK to have such
>> an opinion and express so, just keep it in context.
>
> Of course, everything I say is in my opinion, just as everything you say
> is
> in your opinion :slight_smile:
>

i’m aware of one thing the YAST partitioner can’t do, but that’s not a
good example in this context: including BTRFS partitions in RAID arrays.
just read an openFATE request asking this to be included in YAST, and the
manual procedure to do it was explained.

apart from this special case, i also believe it’s good to do things from
the command line. it improves one’s understanding of what actually happens
and will be of benefit when things go wrong.

otherwise, which tool one uses is of no consequence, of course. but i
agree with carlos: in the interest of new users, using only
point-and-click procedures will not help with undrstanding the ‘nuts &
bolts’ of the system. one of the advantages of linux is (used to be?) that
users could actually do with their systems what they wanted, unlike
windows, but that requires some understanding of how things work. i
wouldn’t want to force anybody to use the CLI, but a suggestion doesn’t
hurt, IMO.


phani.

On 2012-05-15 03:10, phanisvara das wrote:
> otherwise, which tool one uses is of no consequence, of course. but i agree
> with carlos: in the interest of new users, using only point-and-click
> procedures will not help with undrstanding the ‘nuts & bolts’ of the
> system. one of the advantages of linux is (used to be?) that users could
> actually do with their systems what they wanted, unlike windows, but that
> requires some understanding of how things work. i wouldn’t want to force
> anybody to use the CLI, but a suggestion doesn’t hurt, IMO.

Right. On the other hand, I often use one of those automatics GUIs to
configure something, and when done I take a manual look at it, or adjust
something or other. Or not. It is easier than doing all the configuration
manually.

Then there are things complex, and things easy. In this particular case,
mounting partitions, I think it is easy enough :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-05-15 03:16, Acts1036 wrote:
>
> It is my opinion that you are both to the thanked for your opinions;)

Good! That’s the spirit :slight_smile:

> Now i used Yast PM, and now fstab says (edited 9:13),

We forgot something: to ask you to post computer text inside codetags.
Advanced editor, # button. I’ll do it to your fstab in order to read it better.


> /dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part5 swap      swap       defaults              0 0
> /dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part6 /         ext4       acl,user_xattr        1 1
> /dev/disk/by-id/ata-Maxtor_6L080M0_L23WQ79G-part7 /home     ext4       defaults              1 2
> /dev/sdb2                                         /Storage  ntfs-3g    user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
> /dev/disk/by-id/usb-ADATA_USB_Flash_Drive_12109090614802D9-0:0-part1  /windows/D           vfat     users,gid=users,umask=0002,utf8=true,nofail 0 0

> /dev/sda1            /WinAS               ntfs-3g    user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
> /dev/sdc6            /WinF                ntfs-3g    user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
> /dev/sdc5            /WinH                ntfs-3g    user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

What should be done to give full RW to at least the main user. And how
should i test this before i reboot? Thanks again

If you need RW access only to one user, add “UID=username” to the options.
You can do that with the partition manager, I think. Or you can do that
with an editor.

You could do this in any terminal - assuming you use kde, in konsole:



su -

umount /Storage

kwrite /etc/fstab

mount /Storage

ls -l /Storage


Explained: first, become root in this terminal session. Then, umount the
/dev/sdb2 partition. Then edit fstab (use any editor you like, just not an
office one), and add just “uid=username” to the options, where username is
the user you want to give access.

The line would be like this:


> /dev/sdb2             /Storage  ntfs-3g    user,users,gid=users,uid=username,fmask=133,dmask=022,locale=en_US.UTF-8    0 0

You save the file, exit the editor, and mount that partition again.
Finally, list the contents of that partition to see if it worked.

Now, if you want to give access to all users, you have to do it different:
replace all the options with only “defaults”.

If it works, repeat for all windows partitions.

But there are more things to do. :slight_smile:

You have one USB disk. If you forget to have it plugged when you boot, the
system will fail to boot. To avoid this, you have to add the option
“nofail” to it.

You are using direct entries like “/dev/sda”. This may work, or may not,
these entries can change from one boot to another. It is preferable to use
“by-uuid” entries, or “by-id”, or “by_label”. Doing it directly on the
terminal is easy, but not so easy to explain. The yast partitioner should
have done it correctly for you. I’m hesitant what to recommend.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

So, I do suggest for message posts, to use the Advaced Message Editor and place the text, such as a fstab file, into the Code #, as I have done in your quote. So, when you restart openSUSE, does your fstab file work as you want?

Thank You,

I do see the nofail in the USB drive line, and I will go with the default on the others, but am unsure what the "options’ are. Can you give me one line? If it gets too late i will have to try to get back tomorrow.

To address an undying subject:, I do understand the advantage of learning coding, and while i did not get into DOS, when i gt my first used PC (1999) i really wanted to know how the PC worked hardware wise, and am big on customization of Windows, while i hope that Linux can be a real alternative to Windows to most anyone. But you have many Linux users promoting Linux indiscriminately as being such, as i it had no greater learning curve and equal ease of use, yet while it has come a long way, the forums are full of hardware and other problems that often require coding, more so than Windows considering the number of users, or things that lack a GUI. Of course, some of this is due to manufacturers not supporting Linux well.

It is always good to learn mechanics (and i do such to some degree) if you are going to own a car, not everyone who would like to use Linux has the time to learn what is needed, and if Linux is going to have widespread appeal as an alternative to Windows, then i think it needs to work towards making things easier (like my issue here). And i can list things i think Windows can improve on also.

But i appreciate both Windows and Linux, and want to see both become better - and myself especially - and thank you all for helping me here. Good night for now.