• find prune >

    From Bit Twister@21:1/5 to All on Tue Jul 25 08:44:58 2023
    I am getting numerous find errors: Example /userX is just example only
    real account names are being used on system.

    # find / \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal

    find: ‘/user1/.gvfs’: Permission denied
    find: ‘/user2/.gvfs’: Permission denied
    find: ‘/user3/.gvfs’: Permission denied
    find: ‘/run/user4/1800/doc’: Permission denied
    find: ‘/run/user5/1800/gvfs’: Permission denied
    find: ‘/user6/.gvfs’: Permission denied
    find: ‘/user7/.gvfs’: Permission denied
    find: ‘/user8/.gvfs’: Permission denied
    find: ‘/run/user9/1800/doc’: Permission denied
    find: ‘/run/user10/1800/gvfs’: Permission denied

    I would like to prune the /.gvfs and /run/ Permission denied problems.
    Any suggestions welcome and thanks in advance.

    Current command being used, as root in a custom system audit bash script:

    find / \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user user12 -o -group user12

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Waitzmann@21:1/5 to All on Sun Jul 30 21:14:39 2023
    Bit Twister <BitTwister@mouse-potato.com>:
    I am getting numerous find errors: Example /userX is just
    example only real account names are being used on system.


    # find / \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal

    find: ‘/user1/.gvfs’: Permission denied
    find: ‘/user2/.gvfs’: Permission denied
    find: ‘/user3/.gvfs’: Permission denied
    find: ‘/run/user4/1800/doc’: Permission denied
    find: ‘/run/user5/1800/gvfs’: Permission denied
    find: ‘/user6/.gvfs’: Permission denied
    find: ‘/user7/.gvfs’: Permission denied
    find: ‘/user8/.gvfs’: Permission denied
    find: ‘/run/user9/1800/doc’: Permission denied
    find: ‘/run/user10/1800/gvfs’: Permission denied

    I would like to prune the /.gvfs and /run/ Permission denied
    problems. Any suggestions welcome and thanks in advance.


    Please describe (i. e. specify) (in plain english words) the
    exact criterion to distinguish whether a file or directory should
    be found resp. ignored and whether a directory should be
    descended into resp. pruned.  Consider specifying e. g. the names
    and the paths of the pathnames "find" should care of as well as their
    ownerships and group memberships and the access rights they should
    grant.


    Only then will you (or somebody else) be able to set up an
    appropriate "find" command.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bit Twister@21:1/5 to Helmut Waitzmann on Sun Jul 30 20:36:57 2023
    On Sun, 30 Jul 2023 21:14:39 +0200, Helmut Waitzmann wrote:
    Bit Twister <BitTwister@mouse-potato.com>:
    I am getting numerous find errors: Example /userX is just
    example only real account names are being used on system.


    # find / \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal

    find: ‘/user1/.gvfs’: Permission denied
    find: ‘/user2/.gvfs’: Permission denied
    find: ‘/user3/.gvfs’: Permission denied
    find: ‘/run/user4/1800/doc’: Permission denied
    find: ‘/run/user5/1800/gvfs’: Permission denied
    find: ‘/user6/.gvfs’: Permission denied
    find: ‘/user7/.gvfs’: Permission denied
    find: ‘/user8/.gvfs’: Permission denied
    find: ‘/run/user9/1800/doc’: Permission denied
    find: ‘/run/user10/1800/gvfs’: Permission denied

    I would like to prune the /.gvfs and /run/ Permission denied
    problems. Any suggestions welcome and thanks in advance.


    Please describe (i. e. specify) (in plain english words) the
    exact criterion to distinguish whether a file or directory should
    be found resp. ignored and whether a directory should be
    descended into resp. pruned.  Consider specifying e. g. the names
    and the paths of the pathnames "find" should care of as well as their
    ownerships and group memberships and the access rights they should
    grant.


    Only then will you (or somebody else) be able to set up an
    appropriate "find" command.

    Hmm, anyone who can show the appropriate "find" command can see
    most of your "Please describe" requirements. The error messages
    are what I want ignored, not showed/reported.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bit Twister@21:1/5 to Helmut Waitzmann on Sun Jul 30 22:56:19 2023
    On Mon, 31 Jul 2023 05:30:47 +0200, Helmut Waitzmann wrote:
    Bit Twister <BitTwister@mouse-potato.com>:
    On Sun, 30 Jul 2023 21:14:39 +0200, Helmut Waitzmann wrote:
    Bit Twister <BitTwister@mouse-potato.com>:
    I am getting numerous find errors: Example /userX is just
    example only real account names are being used on system.


    # find / \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \ >>>> -prune -o -user normal -o -group normal

    find: ‘/user1/.gvfs’: Permission denied
    find: ‘/user2/.gvfs’: Permission denied
    find: ‘/user3/.gvfs’: Permission denied
    find: ‘/run/user4/1800/doc’: Permission denied
    find: ‘/run/user5/1800/gvfs’: Permission denied
    find: ‘/user6/.gvfs’: Permission denied
    find: ‘/user7/.gvfs’: Permission denied
    find: ‘/user8/.gvfs’: Permission denied
    find: ‘/run/user9/1800/doc’: Permission denied
    find: ‘/run/user10/1800/gvfs’: Permission denied

    I would like to prune the /.gvfs and /run/ Permission denied
    problems. Any suggestions welcome and thanks in advance.


    Please describe (i. e. specify) (in plain english words) the
    exact criterion to distinguish whether a file or directory should
    be found resp. ignored and whether a directory should be
    descended into resp. pruned.  Consider specifying e. g. the names
    and the paths of the pathnames "find" should care of as well as their
    ownerships and group memberships and the access rights they should
    grant.


    Only then will you (or somebody else) be able to set up an
    appropriate "find" command.


    Hmm, anyone who can show the appropriate "find" command can see
    most of your "Please describe" requirements. The error messages
    are what I want ignored, not showed/reported.


    If all you want to do is to avoid "find" to run into a lack of
    permissions, you could do


    find / \
    -type d ! \( -exec test -x \{\} \; -exec test -r \{\} \; \) \
    ! -prune \
    -o \
    \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal


    That will prevent "find" from trying to descend into any
    directory that lacks the search or read permission.


    But that will of course hide even errorneously lacking read and
    execute permissions on any directory.


    No joy here, Still getting Permission denied. :(


    # find / \
    -type d ! \( -exec test -x \{\} \; -exec test -r \{\} \; \) \
    ! -prune \
    -o \
    \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal
    find: ‘/accounts/user_1/.cache/gvfs’: Permission denied
    find: ‘/accounts/user_1/.cache/doc’: Permission denied
    find: ‘/run/user/1800/doc’: Permission denied
    find: ‘/run/user/1800/gvfs’: Permission denied

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Waitzmann@21:1/5 to All on Mon Jul 31 05:30:47 2023
    Bit Twister <BitTwister@mouse-potato.com>:
    On Sun, 30 Jul 2023 21:14:39 +0200, Helmut Waitzmann wrote:
    Bit Twister <BitTwister@mouse-potato.com>:
    I am getting numerous find errors: Example /userX is just
    example only real account names are being used on system.


    # find / \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \ >>> -prune -o -user normal -o -group normal

    find: ‘/user1/.gvfs’: Permission denied
    find: ‘/user2/.gvfs’: Permission denied
    find: ‘/user3/.gvfs’: Permission denied
    find: ‘/run/user4/1800/doc’: Permission denied
    find: ‘/run/user5/1800/gvfs’: Permission denied
    find: ‘/user6/.gvfs’: Permission denied
    find: ‘/user7/.gvfs’: Permission denied
    find: ‘/user8/.gvfs’: Permission denied
    find: ‘/run/user9/1800/doc’: Permission denied
    find: ‘/run/user10/1800/gvfs’: Permission denied

    I would like to prune the /.gvfs and /run/ Permission denied
    problems. Any suggestions welcome and thanks in advance.


    Please describe (i. e. specify) (in plain english words) the
    exact criterion to distinguish whether a file or directory should
    be found resp. ignored and whether a directory should be
    descended into resp. pruned.  Consider specifying e. g. the names
    and the paths of the pathnames "find" should care of as well as their
    ownerships and group memberships and the access rights they should
    grant.


    Only then will you (or somebody else) be able to set up an
    appropriate "find" command.


    Hmm, anyone who can show the appropriate "find" command can see
    most of your "Please describe" requirements. The error messages
    are what I want ignored, not showed/reported.


    If all you want to do is to avoid "find" to run into a lack of
    permissions, you could do


    find / \
    -type d ! \( -exec test -x \{\} \; -exec test -r \{\} \; \) \
    ! -prune \
    -o \
    \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal


    That will prevent "find" from trying to descend into any
    directory that lacks the search or read permission.


    But that will of course hide even errorneously lacking read and
    execute permissions on any directory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Waitzmann@21:1/5 to All on Wed Aug 2 20:00:22 2023
    Bit Twister <BitTwister@mouse-potato.com>:
    On Mon, 31 Jul 2023 05:30:47 +0200, Helmut Waitzmann wrote:
    No joy here, Still getting Permission denied. :(


    # find / \
    -type d ! \( -exec test -x \{\} \; -exec test -r \{\} \; \) \
    ! -prune \
    -o \
    \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal
    find: ‘/accounts/user_1/.cache/gvfs’: Permission denied
    find: ‘/accounts/user_1/.cache/doc’: Permission denied
    find: ‘/run/user/1800/doc’: Permission denied
    find: ‘/run/user/1800/gvfs’: Permission denied


    I can't see how that "find" command could produce those error
    messages.  Could you show more context of the "find" invocation?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bit Twister@21:1/5 to Helmut Waitzmann on Wed Aug 2 18:05:06 2023
    On Wed, 02 Aug 2023 20:00:22 +0200, Helmut Waitzmann wrote:
    Bit Twister <user_1@mouse-potato.com>:
    On Mon, 31 Jul 2023 05:30:47 +0200, Helmut Waitzmann wrote:
    No joy here, Still getting Permission denied. :(


    # find / \
    -type d ! \( -exec test -x \{\} \; -exec test -r \{\} \; \) \
    ! -prune \
    -o \
    \( -path /home -o -path /proc -o -path /var/lib/named/proc \) \
    -prune -o -user normal -o -group normal
    find: ‘/accounts/user_1/.cache/gvfs’: Permission denied
    find: ‘/accounts/user_1/.cache/doc’: Permission denied
    find: ‘/run/user/1800/doc’: Permission denied
    find: ‘/run/user/1800/gvfs’: Permission denied


    I can't see how that "find" command could produce those error
    messages.  Could you show more context of the "find" invocation?

    I do not understand more context, The above output was a cut/past of the
    find command and results except for me changing real user names
    to user_x values.

    $ ls -al /run/user/1800/

    total 4.0K
    drwx------ 2 user_1 user_1 60 Jul 31 00:45 at-spi
    srw-rw-rw- 1 user_1 user_1 0 Jul 31 00:45 bus
    drwx------ 2 user_1 user_1 60 Jul 31 06:57 claws-mail
    drwx------ 3 user_1 user_1 60 Jul 31 00:45 dbus-1
    drwx------ 2 user_1 user_1 40 Aug 2 04:17 dconf
    dr-x------ 2 user_1 user_1 0 Dec 31 1969 doc
    drwx------ 2 user_1 user_1 40 Aug 2 11:30 geany
    drwx------ 2 user_1 user_1 120 Jul 31 06:56 gnupg
    dr-x------ 2 user_1 user_1 0 Jul 31 00:45 gvfs
    drwx------ 2 user_1 user_1 40 Jul 31 00:45 gvfsd
    -rw------- 1 user_1 user_1 350 Jul 31 06:56 ICEauthority
    drwx------ 2 user_1 user_1 80 Jul 31 06:56 pulse
    drwxr-xr-x 5 user_1 user_1 140 Jul 31 00:45 systemd

    $ mount | grep 1800
    tmpfs on /run/user/1800 type tmpfs (rw,nosuid,nodev,relatime,size=1550052k,nr_inodes=387513,mode=700,uid=1800,gid=1800,inode64)
    gvfsd-fuse on /run/user/1800/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1800,group_id=1800)
    portal on /run/user/1800/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1800,group_id=1800)

    As root I get this snippet
    # ls -al /run/user/1800/
    drwx------ 2 user_1 user_1 40 Aug 2 04:17 dconf
    d????????? ? ? ? ? ? doc
    drwx------ 2 user_1 user_1 60 Aug 2 17:57 geany
    drwx------ 2 user_1 user_1 120 Jul 31 06:56 gnupg
    d????????? ? ? ? ? ? gvfs

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)