✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/share/doc/rsync/support//munge-symlinks
#!/usr/bin/env python3
# This script will either prefix all symlink values with the string
# "/rsyncd-munged/" or remove that prefix.

import os, sys, argparse

SYMLINK_PREFIX = '/rsyncd-munged/'
PREFIX_LEN = len(SYMLINK_PREFIX)

def main():
    for arg in args.names:
        if os.path.islink(arg):
            process_one_arg(arg)
        elif os.path.isdir(arg):
            for fn in find_symlinks(arg):
                process_one_arg(fn)
        else:
            print("Arg is not a symlink or a dir:", arg, file=sys.stderr)


def find_symlinks(path):
    for entry in os.scandir(path):
        if entry.is_symlink():
            yield entry.path
        elif entry.is_dir(follow_symlinks=False):
            yield from find_symlinks(entry.path)


def process_one_arg(fn):
    lnk = os.readlink(fn)
    if args.unmunge:
        if not lnk.startswith(SYMLINK_PREFIX):
            return
        lnk = lnk[PREFIX_LEN:]
        while args.all and lnk.startswith(SYMLINK_PREFIX):
            lnk = lnk[PREFIX_LEN:]
    else:
        if not args.all and lnk.startswith(SYMLINK_PREFIX):
            return
        lnk = SYMLINK_PREFIX + lnk

    try:
        os.unlink(fn)
    except OSError as e:
        print("Unable to unlink symlink:", str(e), file=sys.stderr)
        return
    try:
        os.symlink(lnk, fn)
    except OSError as e:
        print("Unable to recreate symlink", fn, '->', lnk + ':', str(e), file=sys.stderr)
        return
    print(fn, '->', lnk)


if __name__ == '__main__':
    our_desc = """\
Adds or removes the %s prefix to/from the start of each symlink's value.
When given the name of a directory, affects all the symlinks in that directory hierarchy.
""" % SYMLINK_PREFIX
    epilog = 'See the "munge symlinks" option in the rsyncd.conf manpage for more details.'
    parser = argparse.ArgumentParser(description=our_desc, epilog=epilog, add_help=False)
    uniq_group = parser.add_mutually_exclusive_group()
    uniq_group.add_argument('--munge', action='store_true', help="Add the prefix to symlinks (the default).")
    uniq_group.add_argument('--unmunge', action='store_true', help="Remove the prefix from symlinks.")
    parser.add_argument('--all', action='store_true', help="Always adds the prefix when munging (even if already munged) or removes multiple instances of the prefix when unmunging.")
    parser.add_argument('--help', '-h', action='help', help="Output this help message and exit.")
    parser.add_argument('names', metavar='NAME', nargs='+', help="One or more directories and/or symlinks to process.")
    args = parser.parse_args()
    main()

# vim: sw=4 et

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
19 Jun 2026 4.57 AM
root / root
0755
Makefile
0.078 KB
11 Jan 2005 6.37 PM
root / root
0644
atomic-rsync
5.068 KB
30 Dec 2021 8.29 PM
root / root
0644
cvs2includes
1.188 KB
17 Jun 2020 1.27 AM
root / root
0644
deny-rsync
0.981 KB
17 Jun 2020 1.27 AM
root / root
0644
file-attr-restore
4.82 KB
17 Jun 2020 1.27 AM
root / root
0644
files-to-excludes
0.525 KB
17 Jun 2020 1.27 AM
root / root
0644
git-set-file-times
3.811 KB
11 Apr 2022 3.57 PM
root / root
0644
instant-rsyncd
2.726 KB
17 Jun 2020 1.27 AM
root / root
0644
logfilter
1.078 KB
17 Jun 2020 1.27 AM
root / root
0644
lsh
3.029 KB
28 Dec 2021 1.57 AM
root / root
0644
lsh.sh
1.082 KB
9 Jan 2022 10.03 PM
root / root
0644
mapfrom
0.618 KB
17 Jun 2020 1.27 AM
root / root
0644
mapto
0.61 KB
17 Jun 2020 1.27 AM
root / root
0644
mnt-excl
1.805 KB
17 Jun 2020 1.27 AM
root / root
0644
munge-symlinks
2.556 KB
21 Dec 2021 12.41 AM
root / root
0644
nameconvert
1.491 KB
6 Aug 2020 4.32 AM
root / root
0644
rrsync
12.321 KB
10 Jan 2022 1.47 AM
root / root
0644
rrsync.1.md
4.28 KB
7 May 2022 12.42 AM
root / root
0644
rsync-no-vanished
0.579 KB
13 Nov 2021 6.39 PM
root / root
0644
rsync-slash-strip
0.751 KB
13 Nov 2021 6.39 PM
root / root
0644
rsyncstats
8.487 KB
17 Jun 2020 1.27 AM
root / root
0644
savetransfer.c
4.453 KB
18 Dec 2006 7.24 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF