FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri Feb 26, 2021 03:04



Post new topic Reply to topic  [ 9 posts ] 
Unprivileged mount on Debian 
Author Message

Joined: Wed Aug 06, 2008 07:23
Posts: 7
Post umount fails
I have spent some time learning basic bash scripting ideas and am finding it fairly easy, its a lot like doing batch files in windows, with syntax differences of course.

So now I am trying to get the bash script to work for a standard debian user and... it does not work :(

So I studied information here : http://forum.ntfs-3g.org/viewforum.php?f=3 and here http://www.ntfs-3g.org/support.html#useroption

After making a few changes to dev and mount point permissions I am able to mount the device as a standard debian user with this

>command ntfs-3g /dev/sda /mnt/test

Once the device is mounted I can run any other standard cp commands and they work as expected. My problem is that If I try to unmount I get the following errors.

Code:
remus@server:~$ umount /mnt/test
umount: only root can unmount /dev/sda from /mnt/test


heres another way to try it.

Code:
remus@server:~$ fusermount -u /mnt/test
fusermount: entry for /mnt/test not found in /etc/mtab


so all I need to do now is figure out how to unmount as a standard debian user from the command prompt and my bash script for the office backup server will be ready to go.[/code]


Thu Aug 14, 2008 08:45
Profile
Tuxera CTO

Joined: Tue Nov 21, 2006 23:15
Posts: 1648
Post 
You must use at least NTFS-3G 1.2712 with internal FUSE support to make unprivileged mount safely work.


Thu Aug 14, 2008 11:51
Profile

Joined: Wed Aug 06, 2008 07:23
Posts: 7
Post my ntfs-3g version
Quote:
You must use at least NTFS-3G 1.2712 with internal FUSE support to make unprivileged mount safely work.


Code:
server:/home/remus# ntfs-3g --help

ntfs-3g 1.516 - Third Generation NTFS Driver

Copyright (C) 2005-2006 Yura Pakhuchiy
Copyright (C) 2006-2007 Szabolcs Szakacsits

Usage:    ntfs-3g <device|image_file> <mount_point> [-o option[,...]]

Options:  ro, force, locale=, uid=, gid=, umask=, fmask=, dmask=,
          streams_interface=. Please see details in the manual.

Example:  ntfs-3g /dev/sda1 /mnt/win -o force,locale=en_EN.UTF-8

Ntfs-3g news, support and information: http://ntfs-3g.org


Fri Aug 15, 2008 02:45
Profile
Tuxera CTO

Joined: Tue Nov 21, 2006 23:15
Posts: 1648
Post 
Your driver is very old, unsafe, low performing, and insecure. There were 16(!!!) stable driver releases since then: http://ntfs-3g.org/releases.html

Remove it and install the latest one.


Fri Aug 15, 2008 18:30
Profile

Joined: Wed Aug 06, 2008 07:23
Posts: 7
Post old driver
OK, I will manually remove the version of ntfs-3g driver I have and manually install the latest version, I had installed what was available from debian sources previously.

Will let you know how this goes.


Mon Aug 18, 2008 03:27
Profile

Joined: Wed Aug 06, 2008 07:23
Posts: 7
Post Problems upgrading ntfs-3g
I'm a linux beginner and having trouble upgrading to a newer version of ntfs-3g

I downloaded ntfs-3g-1.2812.tgz, extracted it and from a terminal ran ./configure, the response is below..

Code:
server:/home/remus/Desktop/Downloads/ntfs-3g-1.2812# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... no
checking for cc... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
server:/home/remus/Desktop/Downloads/ntfs-3g-1.2812#


Wed Aug 20, 2008 07:23
Profile

Joined: Wed Aug 06, 2008 07:23
Posts: 7
Post Upgraded to new version and still can not umount
Code:
remus@server:~$ ntfs-3g --help

ntfs-3g 1.2812 integrated FUSE 27 - Third Generation NTFS Driver

Copyright (C) 2006-2008 Szabolcs Szakacsits
Copyright (C) 2005-2007 Yura Pakhuchiy

Usage:    ntfs-3g <device|image_file> <mount_point> [-o option[,...]]

Options:  ro (read-only mount), force, remove_hiberfile, locale=,
          uid=, gid=, umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual.

Example:  ntfs-3g /dev/sda1 /mnt/win -o force

Ntfs-3g news, support and information:  http://ntfs-3g.org


Wed Aug 20, 2008 09:45
Profile
Tuxera CTO

Joined: Tue Nov 21, 2006 23:15
Posts: 1648
Post Re: Problems upgrading ntfs-3g
remus wrote:
I'm a linux beginner and having trouble upgrading to a newer version of ntfs-3g

I downloaded ntfs-3g-1.2812.tgz, extracted it and from a terminal ran ./configure, the response is below..

[...]
checking for cc... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
server:/home/remus/Desktop/Downloads/ntfs-3g-1.2812#[/code]

This means that you either doesn't have a C compiler installed or it's not in your $PATH.


Wed Aug 20, 2008 12:59
Profile

Joined: Wed Aug 06, 2008 07:23
Posts: 7
Post [Solved]
Well I went back to google and searched the net for my new problem, being that my system was not compatable with the latest version of ntfs-3g. Soooo....

I will make a long story short and just say that in order for my system which is a stock standard debian 4 etch, to be able to run the latest version of ntfs-3g I had to install

build-essential_11.3_i386.deb

After installing this bunch of packages I was able to..

./configure
make
make install

And also followed the suggestions related to permissions found here > http://www.ntfs-3g.org/support.html#useroption

I also had to make an entry in the /etc/fstab file like this >
/dev/sda /mnt/test ntfs rw,user,noauto 0 0

I'm not sure if rebooting was required but I did it anyway, I also disabled auto hotplug of devices on my system.

I have learn't a few things following all these posts which is a good thing, and my bash script is working ok at the moment, I should say that I did get a warning lastnight saying that the drive could not be unmounted because it was busy, I will post the exact message when/if I see it again.

I would like to thank szaka for all the help :)


Thu Aug 21, 2008 09:50
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.