[Solved]Permission denied?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[Solved]Permission denied?

Postby Spinnifex » Apr 14th, '21, 16:00

Hello

If I open a console and type
Code: Select all
blkid


nothing happend.
Maybe I have no permission?
Why this is not stated?

regards
Spinnifex
Last edited by Spinnifex on Apr 18th, '21, 16:48, edited 1 time in total.
Spinnifex
 
Posts: 123
Joined: Nov 25th, '19, 12:38
Location: Europe / Potsdam

Re: Permission denied?

Postby sturmvogel » Apr 14th, '21, 16:05

blkid is a root only command. You can use:
Code: Select all
sudo blkid

or
Code: Select all
su -
blkid


Or you follow the recommendation from the blkid manpages if you don't want to use root permissions:
https://man7.org/linux/man-pages/man8/blkid.8.html
It is recommended to use lsblk(8) command to get information
about block devices, or lsblk --fs to get an overview of
filesystems, or findmnt(8) to search in already mounted
filesystems.

lsblk(8) provides more information, better control on
output formatting, easy to use in scripts and it does not
require root permissions to get actual information. blkid
reads information directly from devices and for non-root
users it returns cached unverified information. blkid is
mostly designed for system services and to test libblkid
functionality.
Last edited by sturmvogel on Apr 14th, '21, 16:09, edited 1 time in total.
sturmvogel
 
Posts: 684
Joined: Jul 30th, '12, 00:39

Re: Permission denied?

Postby Spinnifex » Apr 14th, '21, 16:09

Thank you
root only command

Okay. Why this is not stated?
Spinnifex
 
Posts: 123
Joined: Nov 25th, '19, 12:38
Location: Europe / Potsdam

Re: Permission denied?

Postby morgano » Apr 14th, '21, 16:54

Yes that is odd.
Ask upstream.
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1314
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Permission denied?

Postby doktor5000 » Apr 14th, '21, 18:04

No, it's not odd - it's already in the documentation:
man blkid wrote:DESCRIPTION
[...]blkid reads information directly from devices and for non-root users it returns cached unverified information

If there's nothing cached, then there's also no output. That is not an error.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron