LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2021, 06:56 AM   #1
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406
Blog Entries: 4

Rep: Reputation: 80
df command reporting errors.


Hello,
When I do a df command the system says this.

nigel@localhost Desktop]$ df
df: /run/user/1000/doc: Operation not permitted
Filesystem Size Used Avail Use% Mounted on
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 63M 12G 1% /dev/shm
tmpfs 12G 1.2M 12G 1% /run
/dev/sda1 110G 11G 94G 10% /
tmpfs 12G 1.7M 12G 1% /tmp
/dev/sdb1 1.8T 34G 1.8T 2% /home
tmpfs 2.4G 104K 2.4G 1% /run/user/1000
[nigel@localhost Desktop]$
Any answers ?
Thanking You.
Nigel c
 
Old 03-30-2021, 07:07 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,229

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
nigel@localhost Desktop]$ df
df: /run/user/1000/doc: Operation not permitted
Depending in which user and which directroy you are in, you will see this error. If you are a regular user, and run the command on the root partiton, you do not have permission to do so.

Either su to root and run it or sudo and run it. This part depends on what distro you are running.
 
Old 03-30-2021, 11:14 AM   #3
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by camorri View Post
Depending in which user and which directroy you are in, you will see this error. If you are a regular user, and run the command on the root partiton, you do not have permission to do so.

Either su to root and run it or sudo and run it. This part depends on what distro you are running.
I agree with the "run it as root" part, but I do not understand why a regular user (UID = 1000) would get that explicit message since every directory in that path has at least r-x permissions for the user/owner. I see the same message on my system.

There is a split of paths at /run/user/* where both user 0 and user 1000 have continuing paths but the message is not about unable to follow the /run/user/0/* path, but about the /run/user/1000/doc path.

The only conjecture I can make is that it is a bug in df in that it reports the last path seen instead of the one that actually fails.

Another question I have is "why is df attempting to report data on a virtual file system?" /run is a tmpfs structure and df should not even look at those since the user has no way to affect that space anyway. Although on fedora /run/media is the mount point for media file systems, none of the rest of /run has any connection to an actual hard file system.

I just checked on my Ubuntu system which mounts media at /media and it also gives the same error "df: /run/user/1000/doc: Operation not permitted" to the df command when run as a regular user. This really seems a bug in df.

We should not be forced to run df as root. Df does not give similar errors anyplace else that I have seen even though there are other large parts of the / file system that are not user readable, such as /root, /selinux, etc.
 
Old 03-30-2021, 04:55 PM   #4
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406

Original Poster
Blog Entries: 4

Rep: Reputation: 80
Hello,
This is/was running as a user. I am running as a user. This is mageia version 8.
It has only been used for a short while. It could be a bug.

Code:
uname -a
Linux localhost.localdomain 5.10.25-desktop-1.mga8 #1 SMP Sat Mar 20 16:45:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[nigel@localhost Desktop]$
cheers.
 
Old 03-30-2021, 05:01 PM   #5
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406

Original Poster
Blog Entries: 4

Rep: Reputation: 80
I have just found something interesting. When the command is run as root it reports this:
Code:
[nigel@localhost Desktop]$ su -
Password: 
[root@localhost ~]# df
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         12G     0   12G   0% /dev
tmpfs            12G   66M   12G   1% /dev/shm
tmpfs            12G  1.2M   12G   1% /run
/dev/sda1       110G   11G   94G  10% /
tmpfs            12G  4.1M   12G   1% /tmp
/dev/sdb1       1.8T   34G  1.8T   2% /home
tmpfs           2.4G  108K  2.4G   1% /run/user/1000
[root@localhost ~]#
nigel.
 
Old 03-30-2021, 05:11 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What is in this doc directory, none of my computers has it.

Last edited by Emerson; 03-30-2021 at 05:26 PM.
 
Old 03-30-2021, 06:37 PM   #7
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
On my Ubuntu system it is
Code:
ls -R /run/user/1000/doc
/run/user/1000/doc:
by-app

/run/user/1000/doc/by-app:
snap.snap-store

/run/user/1000/doc/by-app/snap.snap-store:
On my fedora system the doc directory does not exist.
 
Old 03-30-2021, 06:59 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Who is snap? Anybody we know? And what this citizen snap is storing there? And what kind of weird permissions our friend snap is applying on it?
 
Old 03-30-2021, 08:29 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by Emerson View Post
Who is snap? Anybody we know? And what this citizen snap is storing there? And what kind of weird permissions our friend snap is applying on it?
Just another bit of oddity with /run/user/1000/doc, since for me it only exists on my Ubuntu system. That directory has mode 700, and the sub-directories under it are all mode 500. Might have an affect on what df is able to do, but I still don't understand that error when it is owned by the user running df. AFAIK df never writes to the disk it is scanning.

Last edited by computersavvy; 03-30-2021 at 08:30 PM.
 
Old 03-30-2021, 08:41 PM   #10
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406

Original Poster
Blog Entries: 4

Rep: Reputation: 80
The plot thickens.:

I tried the Plasma/kde desktop and it WORKS OK.
Back to Mate & no-good again.
I am not sure what to do now !

Here is the password file:

Code:
[nigel@localhost Desktop]$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/sh
daemon:x:2:2:daemon:/sbin:/bin/sh
adm:x:3:4:adm:/var/adm:/bin/sh
lp:x:4:7:lp:/var/spool/lpd:/bin/sh
sync:x:5:0:sync:/sbin:/bin/sync
mail:x:8:12:mail:/var/spool/mail:/bin/sh
news:x:9:13:news:/var/spool/news:/bin/sh
uucp:x:10:14:uucp:/var/spool/uucp:/bin/sh
operator:x:11:0:operator:/var:/bin/sh
games:x:12:100:games:/usr/games:/bin/sh
nobody:x:65534:65534:Nobody:/:/bin/sh
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
messagebus:x:999:999:system user for dbus:/:/sbin/nologin
systemd-coredump:x:998:998:systemd Core Dumper:/:/sbin/nologin
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin
systemd-journal-remote:x:993:993:systemd Journal Remote:/:/sbin/nologin
systemd-timesync:x:992:992:systemd Time Synchronization:/:/sbin/nologin
rpm:x:991:991:system user for rpm:/var/lib/rpm:/bin/false
polkitd:x:990:990:system user for polkit:/usr/lib/polkit-1:/sbin/nologin
rtkit:x:989:989:system user for rtkit:/proc:/sbin/nologin
mysql:x:988:988:system user for mariadb:/var/lib/mysql:/bin/bash
firebird:x:987:985:system user for firebird:/var/lib/firebird/data:/sbin/nologin
pipewire:x:986:984:PipeWire System Daemon:/var/run/pipewire:/sbin/nologin
flatpak:x:985:983:User for flatpak system helper:/:/sbin/nologin
sddm:x:984:979:system user for sddm:/var/lib/sddm:/sbin/nologin
nigel:x:1000:1000:Nigel:/home/nigel:/bin/bash
samba:x:983:977:system user for samba:/dev/null:/bin/false
davfs2:x:982:976:system user for davfs2:/run/mount.davfs2:/bin/false
geoclue:x:981:975:system user for geoclue:/var/lib/geoclue:/sbin/nologin
[nigel@localhost Desktop]$
About the same time I was fiddling with the keyboard preferences this happened.
Not quite what to do now.

Could try another desktop and see what happens.
 
Old 03-30-2021, 08:56 PM   #11
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
You probably did not want to post the passwd file.!

What do you mean "this happened again".
This thread is about df and the error it gave and I do not understand the tie between that, the switch from plasma to mate, and the password file.

Yes, almost every near modern and newer system assigns the first user to log in the UID of 1000. That is a given, but does not tie your last post to the topic.

In case you are concerned about the error from df, don't be. It has been there for some time and is actually benign as far as actual results.

Note the numbers reported are the same whether run as root (sudo) or as my regular user.
Code:
$ sudo df
[sudo] password for user: 
Filesystem     1K-blocks     Used Available Use% Mounted on
tmpfs             794548     4568    789980   1% /run
/dev/mmcblk0p2  61075384 14900548  43595748  26% /
tmpfs            3972728        0   3972728   0% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs               4096        0      4096   0% /sys/fs/cgroup
/dev/mmcblk0p1    258095   140187    117909  55% /boot/firmware
/dev/sda1       31072236 14394016  15076788  49% /media/move
tmpfs             794544      156    794388   1% /run/user/1000


$ df
df: /run/user/1000/doc: Operation not permitted
Filesystem     1K-blocks     Used Available Use% Mounted on
tmpfs             794548     4568    789980   1% /run
/dev/mmcblk0p2  61075384 14900548  43595748  26% /
tmpfs            3972728        0   3972728   0% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs               4096        0      4096   0% /sys/fs/cgroup
/dev/mmcblk0p1    258095   140187    117909  55% /boot/firmware
/dev/sda1       31072236 14394016  15076788  49% /media/move
tmpfs             794544      156    794388   1% /run/user/1000

Last edited by computersavvy; 03-30-2021 at 09:12 PM.
 
Old 03-30-2021, 11:57 PM   #12
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406

Original Poster
Blog Entries: 4

Rep: Reputation: 80
All fixed up now. I installed task-cinnamon. It now looks like Ubuntu.

There must some bug in it.

@computersavvy it is hard to get my passwd from :x:

Cheers.

Nc
 
Old 03-31-2021, 01:07 AM   #13
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,806

Rep: Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207
It is certainly a gvfs mount (Gnome Virtual File System).
Mate is Gnome. KDE is not Gnome.
 
Old 03-31-2021, 01:07 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,925

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
Quote:
Originally Posted by nigelc View Post
There must some bug in it.
That is just wrong. The correct sentence would be: there is something what you don't understand.
Unfortunately I cannot explain it, because I have no doc dir too, but I guess it is a special kind of dir used by a special kind of app. Probably related to this: https://snapcraft.io/store
 
Old 03-31-2021, 03:44 AM   #15
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406

Original Poster
Blog Entries: 4

Rep: Reputation: 80
I'll keep working on it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] df reporting 100% but du reporting 20% guna_pmk Linux - Server 1 04-15-2011 11:34 AM
ddclient reporting errors frequently patufet99 Linux - Server 4 10-18-2009 11:12 PM
cron reporting errors with sendmail slybob Linux - Server 3 01-23-2007 07:12 AM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
MySQLd reporting fatal errors bcf2 Linux - Software 0 07-13-2005 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration