Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
whenever I attach a USB drive to my box, I can only mount it as "root".
Trying to automount it by clicking on the drive's icon in Dolphin or Konqueror errs out with a "not authorized to perform this action" error.
How can I fix that?
Here is my system info:
Distro: OpenSUSE 13.2
uname -a: linux <...> 3.14.14-cubox-i #1 SMP Wed May 20 21:09:01 UTC 2015 armv7l armv7l armv7l GNU/Linux
Sorry, but that aproach is just silly. No Windoze or Mac User would ever acccept having to fiddle around with his/her system's config files, before being able to access data on a new thumb drive - and neither do I. I know that Ubuntu users can access their portable drives w/o fstab hassle, so why shouldn't OpenSUSE be able do it?
Last edited by Timatekore; 08-13-2017 at 05:35 PM.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
There is a setting to specify what action to take when removable media is inserted. It's probably somewhere in Yast2. But it would be faster to just edit /etc/fstab than search for the setting. I don't know exactly where it is in opensuse.
/usr/bin/udisksctl mount -b /dev/sdXN /media/<user>/mount_name > /dev/null 2>&1
no chmod/chown..."noise".
What system groups do you or the user belong to?
plugdev I think is necessary for usb actions by a user.
Code:
AUDIENCE
This program does not assume that the caller is the super user - it is
intended to be used by unprivileged users and authorizations are
checked by the udisks daemon using polkit(8).
/usr/bin/udisksctl mount -b /dev/sdXN /media/<user>/mount_name > /dev/null 2>&1
no chmod/chown..."noise".
What system groups do you or the user belong to?
plugdev I think is necessary for usb actions by a user.
Code:
AUDIENCE
This program does not assume that the caller is the super user - it is
intended to be used by unprivileged users and authorizations are
checked by the udisks daemon using polkit(8).
/usr/bin/udisksctl mount -b /dev/sdXN /media/<user>/mount_name > /dev/null 2>&1
no chmod/chown..."noise".
What system groups do you or the user belong to?
plugdev I think is necessary for usb actions by a user.
Code:
AUDIENCE
This program does not assume that the caller is the super user - it is
intended to be used by unprivileged users and authorizations are
checked by the udisks daemon using polkit(8).
Alas, neither adding my user to group plugdev nor trying to mount the disk manually via udisksctl makes any difference.
The error message is still: "Authorization required (as root)" respectively "No permission ..."
4. If a device/partition is not listed in fstab ONLY ROOT may mount the device/partition.
5. Users may mount a device/partition if the device is in fstab with the proper options.
Trying to automount it by clicking on the drive's icon in Dolphin or Konqueror errs out with a "not authorized to perform this action" error.
How can I fix that?
This reads like a PolKit issue to me. It is possible to lock openSUSE down a bit depending on the environment it's being used in. This can impact on user access includes, including with PolKit privileges relating to udisks/DE auto-mounting of external media. I'm wondering if your system is set as 'secure' or even 'paranoid' perhaps. For reference, the system I'm using is set to 'easy'.
Quote:
An openSUSEŽ Leap system includes the files permissions, permissions.easy, permissions.secure, and permissions.paranoid, all in the directory /etc. The purpose of these files is to define special permissions, such as world-writable directories or, for files, the setuser ID bit (programs with the setuser ID bit set do not run with the permissions of the user that has launched it, but with the permissions of the file owner, usually root). An administrator can use the file /etc/permissions.local to add his own settings.
To define which of the above files is used by openSUSE Leap's configuration programs to set permissions, select Local Security in the Security and Users section of YaST. To learn more about the topic, read the comments in /etc/permissions or consult the manual page of chmod (man chmod).
In addition to the above, it might pay to check the following as well...
Code:
grep "POLKIT" /etc/sysconfig/security
although I don't expect to see any PolKit privilege restrictions here (unless you explicitly set them).
More just for information purposes....
Quote:
9.2.3 Default Privileges
Report Bug
#
Each application supporting PolKit comes with a default set of implicit policies defined by the application's developers. Those policies are the so-called “upstream defaults”. The privileges defined by the upstream defaults are not necessarily the ones that are activated by default on SUSE systems. openSUSE Leap comes with a predefined set of privileges that override the upstream defaults:
/etc/polkit-default-privs.standard
Defines privileges suitable for most desktop systems
/etc/polkit-default-privs.restrictive
Designed for machines administrated centrally
To switch between the two sets of default privileges, adjust the value of POLKIT_DEFAULT_PRIVS to either restrictive or standard in /etc/sysconfig/security. Then run the command set_polkit_default_privs as root.
Do not modify the two files in the list above. To define your own custom set of privileges, use /etc/polkit-default-privs.local. For details, refer to Section 9.4.3, “Modifying Configuration Files for Implicit Privileges”.
This reads like a PolKit issue to me. It is possible to lock openSUSE down a bit depending on the environment it's being used in. This can impact on user access includes, including with PolKit privileges relating to udisks/DE auto-mounting of external media. I'm wondering if your system is set as 'secure' or even 'paranoid' perhaps. For reference, the system I'm using is set to 'easy'.
Thx for the hint, but I am afraid on my system the bug sits elsewhere:
Quote:
cat /etc/sysconfig/security
## Path: System/Security/Permissions
## Description: Configuration of permissions on the system
## Type: string
## Default: "easy local"
#
# Permission settings to use. By default 'easy', 'secure' and
# 'paranoid' exist. You may define your own though.
#
PERMISSION_SECURITY="easy local"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.