Salt-call error OSError: [Errno] Permission denied: '/root/.gvfs '

Source: Internet
Author: User
Tags disk usage diskusage

Today I get the disk information through a salt, and return to MySQL, but found a little bit of minion in the table, and then viewed, are some of the new IBM X3650 M4 machines

Then in the Saltstack source found the implementation of Status.diskusage, first see how to implement the disk usage, the following is the source

ret = {}for path in selected:    fsstats = OS.STATVFS (path)    Blksz = fsstats.f_bsize    available = Fsstats.f_bavail * Blksz Total    = fsstats.f_blocks * Blksz    Ret[path] = {"Available": Available, "All": Total}return ret

Just print out the path and see what it is.

Add on line No. 454 of the salt/modules/status.py file

Print Pathsalt-call-l Debug Status.diskusage

You can see that path has traversed several directories, and the following is the directory

/export/proc/sys/fs/binfmt_misc/proc/home/dev/swap/boot/efi//selinux/proc/bus/usb/net/dev/pts/misc/root/.gvfs

Found/ROOT/.GVFS, because the salt is normal user-initiated, can not read the/root/directory, so first look at this is what to do

[email protected] admin]# mount |grep gvfsgvfs-fuse-daemon on/root/.gvfs type Fuse.gvfs-fuse-daemon (Rw,nosuid,nodev) [ [Email protected] admin]# PS aux|grep/root/.gvfs|grep-v greproot 8810 0.0 0.0 274812  2796?        SSL  Apr24   
[[email protected] admin]# ls-al/root/.gvfs/total usage 4dr-x------.  2 root root    0 April  18:33. dr-xr-x---. root root 4096 May  26 15:51.

The directory is empty, but it is also mounted
After viewing the information, we found that Chinaunix has an explanation, the following is the connection

Http://bbs.chinaunix.net/thread-2004280-1-1.html

Execute command again after uninstallation, ok!

Salt-call error OSError: [Errno] Permission denied: '/root/.gvfs '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.