Article 4YT74 [SOLVED] Permissions? User can mount media using GUI but not by command line

[SOLVED] Permissions? User can mount media using GUI but not by command line

by
silverlining
from LinuxQuestions.org on (#4YT74)
(I'm sure this has been asked before but I haven't found yet how to search using all the words in this thread title. If someone could give me a tip, I'd appreciate it.)

My Problem:
I can't find the way to mount media as a regular user at the command line. I know how to do it as root but I want to know the right way to do things and not always use root.

On command-line logged in as user: pete, I first made a directory that had my ownership permissions.

Code:$ mkdir tmp
$ ls -al tmp
drwxr-xr-x 2 pete users 4096 Feb 2 12:31.
drwx--x--x 29 pete users 4096 Feb 2 12:31.
$ mount /dev/sdc1 tmp
mount: only root can do thatOkay, so go to GUI ($ startx). Now in Xfce, the icon is shown on the desktop for the USB stick and hovering the mouse over it says Volume not mounted yet. I right-click it and choose Mount Volume. Open Terminal Emulator to check mount.

Code:$ mount
/dev/sdc1 on /run/media/pete/KINGSTON type vfat (rw,nodev,nosuid,uid=1000,gid=100,shortname=mixed,utf8=1,showexec,flush,uhelper=udisks2)Now try to unmount it.

Code:$ umount /dev/scc1
unmount: /run/media/pete/KINGSTON: unmount failed: Operation not permitted
$
$ ls -al /run/media/pete
drwxr-x---+ 3 root root 60 Feb 2 12:50 .
drwxr-xr-x 3 root root 60 Feb 2 12:50 ..
drwxr-xr-x 3 pete users 4096 Dec 31 1969 KINGSTONI see that directory pete was temporarily created with root permissions, so that is why I can't unmount it.

I found something on the Internet that said that the media itself must be mounted with the user information so using information from the successful (GUI) mount, I tried:

Code:$ mount /dev/sdc1 ~/tmp -o uid=1000 -o gid=100
mount: only root can use "--options" optionWell, that didn't work. So how did Thunar do it while I was logged in as user and how can I do it myself at the command line as user without having to use root? I only use the GUI for a program that needs it.latest?d=yIl2AUoC8zA latest?i=XrV7NJG8dT4:5dHG2HMDZeE:F7zBnMy latest?i=XrV7NJG8dT4:5dHG2HMDZeE:V_sGLiP latest?d=qj6IDK7rITs latest?i=XrV7NJG8dT4:5dHG2HMDZeE:gIN9vFwXrV7NJG8dT4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments