Author Topic: [SOLVED] Problem saving files using ntfs-3g  (Read 15055 times)

Offline SinoTech

  • Single posting newcomer
  • *
  • Posts: 5
[SOLVED] Problem saving files using ntfs-3g
« on: June 20, 2009, 02:07:54 am »
Hi all,
I use a NTFS partition to share sources between linux and windows. To mount this partition on linux I use ntfs-3g. When I mount this partition as user "user1" I'm unable to save files to this partition in codeblocks as "user2". As the ntfs-3g driver does not support permissions, the permissions are always set to "rwxrwxrwx". So all users should be allowed to create, update and delete files. In fact, using the bash (or the offical codeblocks release 8.02) saving changes to any file works. It's only the current SVN head that tells me that saving files did not work.

- Official release works with normal linux filesystems (ext2, ext3, ...) as well as with my NTFS partition.
- Latest SVN head works with normal linux filesystems (ext2, ext3, ...) BUT NOT with my NTFS partition.

So I'm wondering why latest SVN head tells me that it can't save changes to a file while prior versions successfully do. Also, as it works with other filesystems I'm wondering if that is a problem of NTFS-3G or codeblocks. Any help is appreciated.

Cheers,

Sino
« Last Edit: June 21, 2009, 11:55:40 pm by SinoTech »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problem saving files
« Reply #1 on: June 20, 2009, 09:20:30 am »
The problem is in the wxWidgets-function we use while saving files.

See my explanation here: http://forums.codeblocks.org/index.php/topic,10263.msg70971.html#msg70971

What I said there for vfat is the same for ntfs3g.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problem saving files
« Reply #2 on: June 20, 2009, 09:53:47 am »
If I mount a ntfs-partition with the following fstab-line at boot time, it works:
Code
/dev/sda2   /windows/xp    ntfs-3g defaults,locale=de_DE.UTF-8     0       0

a call to mount now gives the following:
Code
/dev/sda2 on /windows/xp type fuseblk (rw,allow_other,blksize=4096)

That's no help for vfat user, at least not with the default filesystem-driver.
I don't know if a fuse-driver for vfat exists.
« Last Edit: June 21, 2009, 11:58:51 pm by jens »

Offline SinoTech

  • Single posting newcomer
  • *
  • Posts: 5
Re: Problem saving files
« Reply #3 on: June 21, 2009, 11:54:45 pm »
Thank you for the fast answer. Seems as the problem was that I've added the "uid=...,gid=..." options to my fstab (thought it's a good thing to have all files/directories owned by my local user). After removing that options it works fine. Problem solved.
Keep up the great work :-)

Cheers,

Sino

Offline franzl

  • Single posting newcomer
  • *
  • Posts: 5
Re: [SOLVED] Problem saving files using ntfs-3g
« Reply #4 on: June 24, 2009, 10:01:40 pm »
thanks for the answer, after editing the fstab file it works fine

the old fstab line, which did not work:
Code
UUID=5A50F6AB50F68CCF   /media/data   ntfs   defaults,umask=007,gid=46           0  0

and the new one: I (uid=1000) am the owner
Code
UUID=5A50F6AB50F68CCF   /media/data   ntfs   defaults,uid=1000,gid=46,umask=007  0  0
or this: everbody gets full access
Code
UUID=5A50F6AB50F68CCF   /media/data   ntfs   defaults,umask=000                  0  0