ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/golang/1.22.0/src/cmd/go/testdata/script/list_perm.txt
env GO111MODULE=on

# Establish baseline behavior, before mucking with file permissions.

go list ./noread/...
stdout '^example.com/noread$'

go list example.com/noread/...
stdout '^example.com/noread$'

go list ./empty/...
stderr 'matched no packages'

# Make the directory ./noread unreadable, and verify that 'go list' reports an
# explicit error for a pattern that should match it (rather than treating it as
# equivalent to an empty directory).

[root] stop # Root typically ignores file permissions.
[GOOS:windows] skip # Does not have Unix-style directory permissions.
[GOOS:plan9] skip   # Might not have Unix-style directory permissions.

chmod 000 noread

# Check explicit paths.

! go list ./noread
! stdout '^example.com/noread$'
! stderr 'matched no packages'

! go list example.com/noread
! stdout '^example.com/noread$'
! stderr 'matched no packages'

# Check filesystem-relative patterns.

! go list ./...
! stdout '^example.com/noread$'
! stderr 'matched no packages'
stderr '^pattern ./...: '

! go list ./noread/...
! stdout '^example.com/noread$'
! stderr 'matched no packages'
stderr '^pattern ./noread/...: '


# Check module-prefix patterns.

! go list example.com/...
! stdout '^example.com/noread$'
! stderr 'matched no packages'
stderr '^pattern example.com/...: '

! go list example.com/noread/...
! stdout '^example.com/noread$'
! stderr 'matched no packages'
stderr '^pattern example.com/noread/...: '


[short] stop

# Check global patterns, which should still
# fail due to errors in the local module.

! go list all
! stdout '^example.com/noread$'
! stderr 'matched no packages'
stderr '^pattern all: '

! go list ...
! stdout '^example.com/noread$'
! stderr 'matched no packages'
stderr '^pattern ...: '


-- go.mod --
module example.com
go 1.15
-- noread/noread.go --
// Package noread exists, but will be made unreadable.
package noread
-- empty/README.txt --
This directory intentionally left empty.