File permissions on NTFS mounts read-only

All of my NTFS partitions seem to be mounted as owned by root, with ‘user’ group and others as read-only. However I have not checked the read-only box. Any idea why this is and how I can change it.

Thanks,
Nick

On 2012-04-19 18:36, Nick C wrote:
>
> All of my NTFS partitions seem to be mounted as owned by root, with
> ‘user’ group and others as read-only. However I have not checked the
> read-only box. Any idea why this is and how I can change it.

In fstab.


Cheers / Saludos,

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

On 2012-04-19 18:36, Nick C wrote:
>
> All of my NTFS partitions seem to be mounted as owned by root, with
> ‘user’ group and others as read-only. However I have not checked the
> read-only box. Any idea why this is and how I can change it.

Forgot to say - how is this related to network or internet? You should
request move of this post to the application forum.


Cheers / Saludos,

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

In which case could an administrator move this thread to the Application forum.

Nick

I moved the thread for you.

And: please show us the entries in fstab, run this command and post result here: cat /etc/fstab | grep ntfs

I just tried changing that from YaST -> System -> Partitioner -> select partition -> Edit -> FSTab options
but when I change the options I get:
Error:
This volume label is already in use, select a different one.

However the volume label field is disabled and cannot be changed.

I have now edited fstab manually (fmask=000,dmask=000) which seems to have worked. The only problem I guess is when a different NTFS drive is plugged in and it will again default to ‘fmask=133,dmask=022’. Is there any way of changing those default masks or is that hard coded into NTFS-3g?

Thanks,
Nick

On 2012-04-19 21:16, Nick C wrote:

> In which case could an administrator move this thread to the
> Application forum.

Some one silently did - without warning nntp users.

Ok, as I said, permissions and ownership of ntfs partitions are defined in
the corresponding fstab entry.

For example:


> /dev/disk/by-id/ata-ST9500325AS_5VE68QJX-part2  /windows/C    ntfs-3g   users,gid=users,fmask=0117,dmask=0007,locale=en_US.UTF-8   0 0

That line allows me to write to /windows/C as plain user. Another way, more
popular, is just to write “defaults” in the options section.

> I have now edited fstab manually (fmask=000,dmask=000) which seems to
> have worked. The only problem I guess is when a different NTFS drive is
> plugged in and it will again default to ‘fmask=133,dmask=022’. Is there
> any way of changing those default masks or is that hard coded into
> NTFS-3g?

Are you talking of media that you hotplug? Or partitions in your internal
hard disk?

No, they are not coded into ntfs-3g, or “defaults” would not work. Rather
defaults are overridden with more secure settings.


Cheers / Saludos,

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

Well both really. I have a load of drives in disk caddys which frequently get inserted/removed and swapped to other machines. Hotr swapping would be good but I have to admit I haven’t tried that yet, just getting the basics sorted out first.

Ok lets start at the beginning:
No NTFS drives present in the machine, no entries in FSTab -> Shutdown -> Plug in a new NTFS disk -> Startup
NTFS partitions on this new disk now appear on the desktop and can be mounted by clicking on them.
Samba can then share these from /media/<partition>
Only problem is these are mounted as read only for everyone except root, how can I change the default way these NTFS partitions get mounted?
Hang on just discovered a bigger problem with doing it that way, these partitions are not remounted at boot.

Ok so I guess I need to go into YaST -> Partitioner to set mount points for these. Now when I do this the default mount options in YaST.Partitioner are: fmask=133, dmask=022. Question is how can I change these default options? While on the subject what are the fstab ‘default’ mount options and can those be changed as well?

Thanks,
Nick

On 2012-04-20 13:46, Nick C wrote:
>
> robin_listas;2457125 Wrote:

>> Are you talking of media that you hotplug? Or partitions in your
>> internal hard disk?
>>
> Well both really. I have a load of drives in disk caddys which
> frequently get inserted/removed and swapped to other machines. Hotr
> swapping would be good but I have to admit I haven’t tried that yet,
> just getting the basics sorted out first.

Mmm. It is getting more complicated, then.

> Ok lets start at the beginning:

Good! :slight_smile:

> No NTFS drives present in the machine, no entries in FSTab -> Shutdown
> -> Plug in a new NTFS disk -> Startup

Aha.

> NTFS partitions on this new disk now appear on the desktop and can be
> mounted by clicking on them.

Yes.

> Samba can then share these from /media/<partition>
> Only problem is these are mounted as read only for everyone except
> root, how can I change the default way these NTFS partitions get
> mounted?

Hold on. Disks you mount from the desktop get mounted by the user running
that desktop, not root. So if you say that only root can write, I can see
two causes:

  • One, you are running the desktop as root. Never do this. No excuses!
  • Two, samba shares, they have their own permissions issues.

> Hang on just discovered a bigger problem with doing it that way, these
> partitions are not remounted at boot.

No, they are not. The desktop mounts them only if they are plugged when the
desktop is running, not before. Feature? Bug? I do not know.

> Ok so I guess I need to go into YaST -> Partitioner to set mount points
> for these. Now when I do this the default mount options in
> YaST.Partitioner are: fmask=133, dmask=022. Question is how can I
> change these default options? While on the subject what are the fstab
> ‘default’ mount options and can those be changed as well?

Ok, at this point forget YaST, do it yourself. It is faster and you have
control.

You can add entries in fstab for each disk, and mount points in /etc/mnt
(not /media). It is simple, you copy a previous line and modify what you
need. I would recommend you create labels for each disk and use them in fstab.

Or you can do the mount from the command line (su -). If you have many, you
could create a script that creates the mount point… perhaps share it as
well. More knowledge of your setup to refine proposals.


Cheers / Saludos,

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

On 2012-04-20 14:23, Carlos E. R. wrote:
> You can add entries in fstab for each disk, and mount points in /etc/mnt

Oops. I meant “/mnt”.


Cheers / Saludos,

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

Having a bit of trouble editing fstab manually, what is the name of the basic terminal prompt text editor in openSUSE/Xfce? If I change it using leafpad as a non root user I do not have permissions to save it.

How about the FSTab default options is there some way to change these defaults?

Nick

On 2012-04-20 17:36, Nick C wrote:
>
> Having a bit of trouble editing fstab manually, what is the name of the
> basic terminal prompt text editor in openSUSE/Xfce? If I change it
> using leafpad as a non root user I do not have permissions to save it.

In terminal? I use joe and mcedit, both have menus and help. Otherwise, you
can open a terminal, do “su -” on it to become root, then type “leafpad
/etc/fstab &”. Sudo does not work.

> How about the FSTab default options is there some way to change these
> defaults?

For YaST? Not that I know.


Cheers / Saludos,

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

Nick C wrote:

> No NTFS drives present in the machine, no entries in FSTab -> Shutdown
> -> Plug in a new NTFS disk -> Startup
> NTFS partitions on this new disk now appear on the desktop and can be
> mounted by clicking on them.

I’ve got a bunch of old AT and SATA drives with similar “archive” data. My
approach was to buy a cheap USB adapter that will read those drives. That
makes mounting and swapping really simple as I poke around for what I want.


Will Honea

Thanks, mcedit doesn’t seem to be present but joe works ok. Just got to learn how to use it now.

On 2012-04-21 18:56, Nick C wrote:

> Thanks, mcedit doesn’t seem to be present but joe works ok. Just got
> to learn how to use it now.

mcedit is part of mc. It is a very useful program, but not installed by
default.


Cheers / Saludos,

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

I’d suggest to use “fmask=113,dmask=002” and not “fmask=000,dmask=000” for NTFS mounts (if your user is in users group as default).

Thanks.