NTFS permissions

Not sure where to post this, but since it affects applications not being able to write to NTFS partition such as Ktorrent and any for that matter, i’ll post here…

I can’t seem to get NTFS write permissions to work. I can read fine off it, but i can’t write to it.

I followed guides what to install and how to configure but nothing works…

I get this when i run sudo ntfs-config:

/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/usr/lib64/python2.7/site-packages/NtfsConfig/Fstab/SimpleGladeApp.py:335: Warning: invalid (NULL) pointer instance
  return gtk.glade.XML(self.glade_path, root, domain)
/usr/lib64/python2.7/site-packages/NtfsConfig/Fstab/SimpleGladeApp.py:335: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
  return gtk.glade.XML(self.glade_path, root, domain)
/usr/lib64/python2.7/site-packages/NtfsConfig/Fstab/SimpleGladeApp.py:335: GtkWarning: IA__gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  return gtk.glade.XML(self.glade_path, root, domain)
/usr/lib64/python2.7/site-packages/NtfsConfig/Fstab/SimpleGladeApp.py:335: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
  return gtk.glade.XML(self.glade_path, root, domain)
/usr/lib64/python2.7/site-packages/NtfsConfig/Fstab/SimpleGladeApp.py:335: Warning: value "TRUE" of type `gboolean' is invalid or out of range for property `visible' of type `gboolean'
  return gtk.glade.XML(self.glade_path, root, domain)
Traceback (most recent call last):
  File "/usr/bin/ntfs-config", line 102, in <module>
    main(args, opts)
  File "/usr/bin/ntfs-config", line 75, in main
    app = NtfsConfig()
  File "/usr/lib64/python2.7/site-packages/NtfsConfig/NtfsConfig.py", line 56, in __init__
    os.mkdir(HAL_CONFIG_DIR)
OSError: [Errno 2] No such file or directory: '/etc/hal/fdi/policy'

and right click on drive properties, and setting permissions from there doesn’t do anything either, it just resets itself to default after i close properties then nothing happens, still can’t write. I dual boot Windows7 so i need those NTFS partitions since they’re the storage for both Win7 and SUSE…

uname -a

Linux linux-u8ku 2.6.37.6-0.7-desktop #1 SMP PREEMPT 2011-07-21 02:17:24 +0200 x86_64 x86_64 x86_64 GNU/Linux

Using openSUSE 11.4 x64 (also, what terminal command to list that? i only remember uname -a, but less important i can google it)

I don’t know what info you may need, so please, if you need anything more, just write what i need to do.

In YaST2 i have ntfs3g, ntfs-config and ntfsprogs installed, as guides said i should…
Doesn’t work though…

What am i missing? Why can’t i write to NTFS? Please, any help would be appretiated.

It is my suggestion and recommendation that NTFS drives are setup as follows in your fstab file using only the defaults setting:

/dev/disk/by-id/ata-WDC_WD3000GLFS-01F8U0_WD-WXL408720641-part2        /Windows    ntfs-3g    **defaults **           0    0

Further, I use NTFS partitions as a partition that is used by both Windows & Linux. Often multimedia and document files are to be shared. Linux user files should normally remain in EXT4 partitions with the normal Linux permission setup. But if a file or type of file must be useable by both Linux and Windows users, then consider the setup I use above. I have no write problems what so ever for ANY Linux user writing to an NTFS partition. If this is not your intent for Linux users, then don’t use NTFS would be my suggestion. You must have root permissions to modify the /etc/fstab file and should restart your PC after making such a change to go into effect.

Thank You,

On 2011-09-30 00:46, Vepar wrote:

> I get this when i run sudo ntfs-config:

You get most of those errors because you are using sudo. Use “su -” instead.

> Using openSUSE 11.4 x64 (also, what terminal command to list that?

cat /etc/SuSE-release

> I don’t know what info you may need, so please, if you need anything
> more, just write what i need to do.

The content of fstab, the lines referring to the Windows drives. And the
output of the “mount” command re the same.


Cheers / Saludos,

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

On 2011-09-30 01:56, jdmcdaniel3 wrote:
> and should restart your PC after making
> such a change to go into effect

Umounting and mounting again is enough.


Cheers / Saludos,

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

it is also very unadvisable to let a torrent save to a ntfs partition
there are WAY to many ms windows viruses out there that once a torrent is clicked on or ran or on some a "mouse over " is all that is required to install the virus
if you MUST then have ktorrent save to a ext4 partition temp folder
run clamAV on it
if clean then copy it to the ntfs folder .

normally you will want users to have READ ONLY access to ntfs partitions and only allow root to write to it

ntfs-3g defaults 0 0

is a good choice
a better is


/dev/sda1       /mymnt/win   ntfs-3g  ro,umask=0222,defaults 0 0 

but if you want to take ALL of the security out of it and have a “free for all”
use
---- ntfs-3g rw,umask=0000,defaults 0 0 ----
but i would not .

On 2011-09-30 03:36, JohnVV wrote:
> a better is
>
> Code:
> --------------------
>
> /dev/sda1 /mymnt/win ntfs-3g ro,umask=0222,defaults 0 0
> --------------------

Thats RO, and he wants to write.


Cheers / Saludos,

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

Thanks everyone for replies!

Ok…

Yes, that’s kinda what i’m trying to do. I have one large partition with all kinds of stuff and i want to be able to use it with both Linux and Windows. I need windows for some programs so i can’t just discard it completely.

This is what i get when i use “su”, then ntfs-config…

Traceback (most recent call last):
  File "/usr/bin/ntfs-config", line 102, in <module>
    main(args, opts)
  File "/usr/bin/ntfs-config", line 75, in main
    app = NtfsConfig()
  File "/usr/lib64/python2.7/site-packages/NtfsConfig/NtfsConfig.py", line 56, in __init__
    os.mkdir(HAL_CONFIG_DIR)
OSError: [Errno 2] No such file or directory: '/etc/hal/fdi/policy'

Still won’t let me do anything.

This is my fstab:

/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part3 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part8 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part1 /windows/Boot        ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part2 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part5 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part6 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Windows/C is my windows partition, this doesn’t need to be writeable. Even better if it’s read only actually.
Windows/D partition is for games and game related storage.
Windows/E partition is where i keep all my documents, my work and other, so i need this to be writeable.

So basically i can make windows/E writable by editing it in fstab?
I don’t need ntfs-config?
So what values do i need to change in this entry then?

/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part6 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

Thank you! This is good advice. I was trying to accomplish among other stuff, that i can have the same torrent loaded in both Windows and Linux, so whatever system i use the torrent continues to download. And i’m not that worried about viruses, i have 3 months left of Norton Internet Security 2011 installed on Windows so most eventual threats go away quickly.

You’ll find in some other threads what I’ve personally observed…

I’ve only been able to write to an NTFS partition as root, and this is even if after I open up NTFS permissions to “Everyone - Write”
Also, in my experimentation it looks like it has to be CLI root, not logged into a Desktop as root which suggests to me that KDE applies a security layer on top of system file security, sometimes it makes a difference and others not.

Bottom line is that after you’ve saved anything to your native Linux partitions, you can use CLI root to copy or move to an NTFS partition.

HTH,
Tony

On 2011-09-30 14:46, Vepar wrote:

> robin_listas Wrote:
>> You get most of those errors because you are using sudo. Use “su -”
>> instead.
>
> This is what i get when i use “su”, then ntfs-config…

Not “su”, but “su -”. Anyway, that program appears to have errors.

> This is my fstab:

> Windows/E partition is where i keep all my documents, my work and
> other, so i need this to be writeable.

Change fmask=0117,dmask=0007

> So basically i can make windows/E writable by editing it in fstab?

Yes

> I don’t need ntfs-config?

I’ve never used it.

> JohnVV Wrote:
>> if you MUST then have ktorrent save to a ext4 partition temp folder
>> run clamAV on it if clean then copy it to the ntfs folder .
>
> Thank you! This is good advice. I was trying to accomplish among other

It is typical for this kind of Linux apps to use a feature called “sparse
files”. It means that the space in disk is only reserved for the chunks
that have been already downloaded, and the “holes” do not exist in the
disk, they do not use space. An NTFS partition doesn’t allow this, AFAIK,
the files have to be created entirely at the initial moment.

> stuff, that i can have the same torrent loaded in both Windows and
> Linux, so whatever system i use the torrent continues to download.

That’s an interesting point.

> And
> i’m not that worried about viruses, i have 3 months left of Norton
> Internet Security 2011 installed on Windows so most eventual threats go
> away quickly.

Only those that are already known to the antivirus, not new ones if you are
amongst the first people to see them. I get stuff in my mail that I know is
bad but neither clamav nor antivir detect it.


Cheers / Saludos,

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

I would make the modifications as shown below. Matching spacing is unimportant. Only the change to using the option defaults, as suggested in my first message matters.

/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part3 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part8 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part1 /windows/Boot        ntfs-3g    defaults              0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part2 /windows/C           ntfs-3g    defaults              0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part5 /windows/D           ntfs-3g    defaults              0 0
/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part6 /windows/E           ntfs-3g    defaults              0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Make the suggested changes and reboot. I actually use NTFS partitions on MY PC and so using the defaults option works like a champ.

Thank You,

On 2011-10-01 01:56, jdmcdaniel3 wrote:
>
> I would make the modifications as shown below. Matching spacing is
> unimportant. Only the change to using the option defaults,
> -as_suggested_in_my_first_message_matters-.

And what I suggested also works, as it is what I use :slight_smile:

> Make the suggested changes and reboot.

WHY, oh why on earth reboot?? This is Linux, by the penguin sake!
Just umount the partition, then mount it again.


Cheers / Saludos,

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

WHY, oh why on earth reboot?? This is Linux, by the penguin sake!
Just umount the partition, then mount it again.

Doing a reboot is so easy. So, what would be the correct umount and mount commands to do this:

/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part2 /windows/C           ntfs-3g    defaults              0 0

Now we must provide the exact command procedure and can not assume the OP knows how to do this. As I see it you would enter:

su -
umount  /windows/C
mount /dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part2 /windows/C

You would need to do this four times (less the su command) and then does it use the same defaults setup? You could try the mount -a command, but does that work when all is mounted or must you unmount the four partitions in question one at a time and then use the mount -a or perhaps you just reboot your darn computer as I suggest and be done with it.

Thank You,

Still the same when i use “su -”. The program has errors obvioiusly… :\

Yup! That did it! Setting it to default works, as you said, like a charm. :slight_smile:
Tested it on Ktorrent, on a torrent that was active in windows, it checked it fully and continued download. Deleting stuff from those partitions works too.
Should work for anything else then.

And no i don’t know how to mount/unmount partitions in terminal, so rebooting was the faster choice. It took about 2 minutes, where typing all that in terminal not understanding what i’m doing and googling it all step by step would probably take forever. I’ll learn that when i need to. For now i’m good with reboot!

Thank you everyone for your help! Much appreciated!

And no i don’t know how to mount/unmount partitions in terminal, so rebooting was the faster choice. It took about 2 minutes, where typing all that in terminal not understanding what i’m doing and googling it all step by step would probably take forever. I’ll learn that when i need to. For now i’m good with reboot!

Use what works. :slight_smile: Eventually, you’ll gain an understanding that sometimes all that is needed after making config changes, is to restart a particular service, or in this case, unmounting/mounting the particular volume concerned. (The options that James suggested are the ones i have, which I thought was set by default, but maybe I was wrong).

On 2011-10-01 07:26, Vepar wrote:

> And no i don’t know how to mount/unmount partitions in terminal, so
> rebooting was the faster choice. It took about 2 minutes, where typing
> all that in terminal not understanding what i’m doing and googling it
> all step by step would probably take forever. I’ll learn that when i
> need to. For now i’m good with reboot!

So you are happy with rebooting, like all windows users? You should learn
better.


Cheers / Saludos,

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

On 2011-10-01 03:16, jdmcdaniel3 wrote:
>
>> WHY, oh why on earth reboot?? This is Linux, by the penguin sake!
>> Just umount the partition, then mount it again.
>
> Doing a reboot is so easy.

Absurd.

You have to delete that Windows mentality from your head.

> Now we must provide the exact command procedure and can not assume the
> OP knows how to do this. As I see it you would enter:
>
>
> Code:
> --------------------
> su -
> umount /windows/C
> mount /dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATR5835895-part2 /windows/C
>
> --------------------

No, man!


su -
umount /windows/C
mount /windows/C

> You would need to do this four times (less the su command) and then

Why four? Just once. You don’t even need to type the third line. Cursor up
to retrieve the second line, home, delete the ‘u’, enter.

> does it use the same defaults setup?

It uses whatever you have written in fstab.


Cheers / Saludos,

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

Oh come on, don’t go all anti windows on this thread. Idk what windows did to you but don’t start an OS war here. Yes it’s nice i don’t have to reboot in Linux, i know that, but i’m learning as i need stuff, now i know how to enable write on NTFS, next time i’ll need that, i won’t go asking here. And if i need some special fstab settings i’ll google it. When i started using linux i didn’t know what / and what swap is… As i use the OS more, the more I learn.

Besides, i need windows for some programs…

On 2011-10-01 15:16, Vepar wrote:
> Besides, i need windows for some programs…

I have no objection to that. I do myself. But you have to switch mentality
when you switch OS, no matter in what direction. Else, you are not getting
fully what each system has to offer, and you can get nasty surprises.


Cheers / Saludos,

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

Yup! That did it! Setting it to default works, as you said, like a charm. :slight_smile:
Tested it on Ktorrent, on a torrent that was active in windows, it checked it fully and continued download. Deleting stuff from those partitions works too.
Should work for anything else then.

And no i don’t know how to mount/unmount partitions in terminal, so rebooting was the faster choice. It took about 2 minutes, where typing all that in terminal not understanding what i’m doing and googling it all step by step would probably take forever. I’ll learn that when i need to. For now i’m good with reboot!

Thank you everyone for your help! Much appreciated!

I am happy to hear of your success Vepar. Also forgive me if I may have forgot why I am here trying to help you out. Not everyone shares the same ideas, but everyone is trying to help in their own way.

Thank You,