Page 1 of 2

livecd automounts fat32 with write access but ntfs readonly

Posted: 19. Sep 2010, 16:34
by raymccoy
Hello,
i just make a clone of my perfect lxde live cd (latest version) with the LiveClone Script. Now booting in other things works perfect. If i attach a fat32 usb stick then i can write on it (as user one). If i attach a ntfs stick then i can only read and user one will not be able to write on ntfs (only root can write on ntfs). How can i get the normal user one to get write access on automount ntfs usb partitions?


If think someone has the answer and can tell me.

Thanks a lot for the wunderfull livesystem.

Greatings

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 19. Sep 2010, 17:12
by damNageHack
Duplicated issue than that other one (in german)?
http://www.salixos.org/forum/viewtopic.php?f=28&t=1289

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 19. Sep 2010, 17:35
by Akuna
damNageHack wrote:Duplicated issue than that other one (in german)?
http://www.salixos.org/forum/viewtopic.php?f=28&t=1289
Actually in a way, it is not a bad idea to duplicate a post from a localized forum to the English one, to get help from folks who do not understand your language, especially if the original localized post stays without answer. ;)

With an attached drive, you would have to edit /etc/fstab & use umask=000, but since this is a removable device, you probably may have to modify some udev rules (sorry I'm not familiar with these)

One thing though, NTFS being a journaling file system which adds extra disk activity, it may not be the most judicious formatting choice for a USB stick.

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 19. Sep 2010, 17:39
by damNageHack
Akuna wrote:
damNageHack wrote:Duplicated issue than that other one (in german)?
http://www.salixos.org/forum/viewtopic.php?f=28&t=1289
Actually in a way, it is not a bad idea to duplicate a post from a localized forum to the English one, to get help from folks who do not understand your language, especially if the original localized post stays without answer. ;)
Sorry, I did not notice that it is the same author in both posts... Shame on me! :roll:
Akuna wrote: One thing though, NTFS being a journaling file system which adds extra disk activity, it may not be the most judicious formatting choice for a USB stick.
Is write access to NTFS enabled in the kernel (and the module probably loaded correctly)? I have no experience with NTFS under Linux, I only know that there were problems recently with the write access at the beginnings of implementing a driver into the kernel.

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 20. Sep 2010, 09:37
by pwatk
I have this in my fstab, which makes /mnt/windows read/write for root and read-only for everyone else.

Code: Select all

/dev/sda3        /mnt/windows     ntfs-3g     umask=022        1   0
An easier but less secure approach would be to change the umask to umask=000 which will make /mnt/windows read-write for all users:

Code: Select all

/dev/sda3        /mnt/windows     ntfs-3g     umask=000        1   0
Alternatively, you can use the uid or gid variables to change the owner and/or group of the mount point (AFAIK this only works for FAT and NTFS filesystems to workaround the lack of ACL's). This would make my user account the owner of /mnt/windows:

Code: Select all

/dev/sda3        /mnt/windows     ntfs-3g     uid=1000        1   0
As you can see I used uid=1000, this is my user account id which you can find in /etc/passwd:
...
pwatk:x:1000:100::/home/pwatk:/bin/bash
...
You can find the group id's in /etc/group:
...
users:x:100:
...
You can also mix the above options (owner: pwatk, group: users, permissions: drwxr-x---):

Code: Select all

/dev/sda3        /mnt/windows     ntfs-3g     uid=1000,gid=100,umask=027        1   0
Finally, the Linux kernel supports read-only access to NTFS filesystems but ntfs-3g is required for read/write access.

Hope this helps.

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 20. Sep 2010, 13:41
by raymccoy
So after i started i few tests i can say the livecd based on xfce works for me perfect.
In fact if i made a live usb stick based on the xfce-livecd with the live-clone script i will be able to attach every ntfs formatted usb-hddisk and i can write to the external disk without problems.

If i made a live usb stick based on lxde-livecd with the live-clone script i will be abel to attach every ntfs formatted usb-hddisk and i can only read the external disk without problems (in fact i can't write to to device as non root). This might be occur by using different kernels by the livecd?

So for me it's better to use the xfce-Version because it's working outofthebox!

:D :D :D :D :D

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 20. Sep 2010, 16:07
by pwatk
The kernels are the same but the implementation might be different.

Try this instead from a terminal replacing /dev/sda3 with your ntfs partition and /mnt/windows with your mount point:

Code: Select all

mount -t ntfs-3g -o remount,umask=000 /dev/sda3 /mnt/windows

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 20. Sep 2010, 17:25
by gapan
The exact same kernel is used in both live CDs.

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 20. Sep 2010, 17:34
by damNageHack
gapan wrote:The exact same kernel is used in both live CDs.
This is definitely an issue of automount. I do not know if LXDE provides such a functionality at all.
Take a look to this thread for XFCE settings: http://www.salixos.org/forum/viewtopic.php?f=30&t=1210

Re: livecd automounts fat32 with write access but ntfs readonly

Posted: 20. Sep 2010, 17:37
by gapan
damNageHack wrote:This is definitely an issue of automount.
There is no issue with automount. There is just no automount of usb devices, you have to click on the icon to mount it.
damNageHack wrote:Take a look to this thread for XFCE settings: http://www.salixos.org/forum/viewtopic.php?f=30&t=1210
Everything works fine here with no extra tweaking.

And both of these have nothing to do with the kernel.