You are not logged in.

#1 2015-06-30 03:05:18

j33205
Member
Registered: 2015-06-28
Posts: 38

[CLOSED] Issue Mounting Internal HDD for All User Use

Hello, this is my first post here in the Arch forums so forgive my possible lack of etiquette.  I'm new to Arch but not completely new to Linux but there is still a LOT I don't know/understand.  I'm running a pretty old system hardware-wise but I think it irrelevant to my current issue.  Right now my Arch is running only Openbox, Tint2, and other "essentials" and "non-essentials" and such.  Anyway, the problem I am currently working on is getting internal file systems to mount properly so that I use them.

I want to mount a second internal HDD that is formatted as NTFS.  I don't really have problems mounting it as root, but this seems both non-ideal and unnecessarily annoying (especially for accessing and manipulating files that have been mounted).  I would like to be able to mount the disk from inside my non-root file manager SpaceFM and by extension the terminal as well, again while logged in as a non-root user (as a side note, I would also obviously like to try to keep my NTFS file system from being damaged while being managed by Arch).

So far I have been working with fstab.  Before this point, mounting has only resulted in "you must be root" errors.  First thing I did was add

/dev/sdb1     /media/Temp     ntfs     rw,users     0 0

Temp is a folder that already exists in /media and has me as the owner and users as the group and has 777 permissions before mounting.
In SpaceFM by simply clicking the drive in the devices menu I received a message "Unable to access /media/Temp  Access denied".  Checking the Temp directory as root showed me it was mounting but when I checked the privileges they were changed to 700, owner:root, group:root.  Upon unmount the permissions changed back to what I had before.

From there I did some more searching and reading on NTFS mounting and mounting in general, and came to the conclusion that I needed ntfs-3g and eventually ntfs-3g-fuse from AUR, I only installed the latter.  I changed fstab to what it currently reads

/dev/sdb1     /media/Temp     ntfs-3g     uid=username,gid=users,umask=0022     0 0

With same procedure as before in SpaceFM I get

udevil: denied 88: device /dev/sdb1 is an internal device and you're not root

Which is the same error message I was getting in the first place, and when I try to do the same thing in a root session of SpaceFM it mounts it in /media under the UUID and it is now available to all users to read only, again part of the same problem I was having initially.  I'm not sure where to go from here as I've come full circle.  Am I doing something wrong, is it a SpaceFM thing, is there an easier more sensical way to do this?  I just want what I'd say is a "basic mounting protocol".  Any help is obviously welcome and appreciated, and if I left anything out let me know.  Thanks.

Last edited by j33205 (2015-07-11 04:00:53)

Offline

#2 2015-06-30 05:08:31

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [CLOSED] Issue Mounting Internal HDD for All User Use

Try this...

/dev/sdb1     /media/Temp     ntfs-3g   defaults,uid=1000,gid=users 0 0
sudo mount -av

Last edited by Malkymder (2015-06-30 05:11:12)

Offline

#3 2015-06-30 10:31:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [CLOSED] Issue Mounting Internal HDD for All User Use

Offline

#4 2015-07-01 02:13:48

j33205
Member
Registered: 2015-06-28
Posts: 38

Re: [CLOSED] Issue Mounting Internal HDD for All User Use

Malkymder:  okay that works, the drive is mounted and all users can read/write.  But how do I do this effect without sudoing?

karol:  yes I have, that's what I've been trying.  I am in the group disk, I own the mountpoint, I even made sure that the ntfs-3g binary is set to setuid-root with

chmod 4755 $(which ntfs-3g)

Offline

#5 2015-07-01 03:32:00

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [CLOSED] Issue Mounting Internal HDD for All User Use

reboot see if it still works

the sudo part was just to have it mounted right away after editing the fstab file ...

Offline

#6 2015-07-01 14:46:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,744

Re: [CLOSED] Issue Mounting Internal HDD for All User Use

Just in general and it might not help with your issue, but why did you come up to the conclusion that you'd need ntfs-3g-fuse from AUR? The only difference is that it uses FUSE compiled internally instead of as an external shared library (which might be installed by other user-space mounting utilities already so it might be installed already anyway)  and in addition to that is a full year out of date compared to the package in the repos.

Offline

#7 2015-07-10 01:12:17

j33205
Member
Registered: 2015-06-28
Posts: 38

Re: [CLOSED] Issue Mounting Internal HDD for All User Use

V1del-  I was using ntfs-3g-fuse under the the assumption that it was to allow me to mount it without root permissions:

Allowing user to mount
By default, ntfs-3g requires root rights to mount the filesystem, even with the "user" option in /etc/fstab, the reason why can be found here. The user option in the fstab is still required. To be able to mount as user, a few tweaks need to be made:
First, check that you have access to the mount block you want to use, the easiest way to do that is to be in the disk groups with the following command:

# gpasswd -a username disk

Note: Groups rights sometimes requires rebooting to kick in.
You also need acces right to the mount point you want to use, since we're going to mount something as user on this mountpoint, we might as well own it:

# chown user /mnt/mountpoint

Second is having a NTFS-3G driver compiled with integrated FUSE support, the ntfs-3g package from the official repositories does not, but there is one ntfs-3g-fuseAUR on AUR.
You should now be able to mount your NTFS partition without root rights.

Malk-  the auto mounting works fine.  That wasn't really my initial goal but it suffices.  I was hoping to be able to mount/unmount things manually without being root both in terminal and in file manager (SpaceFM).

If there isn't any more input on that one I might just close this thread.

Offline

Board footer

Powered by FluxBB