dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse


Our Discord Notification Server invitation link is https://discord.gg/jB2qmRrxyD

Author Topic: Bash script console logging (for Clone and Dev mirroring)  (Read 41 times)

Online Chip (OP)

  • Server Admin
  • Admin
  • Hero Member
  • ****
  • Administrator
  • *****
  • Restrictive
  • *
  • RC Discussion
  • **
  • Private
  • ***
  • Owner
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7442
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 06:27:36 AM
  • Deeply Confused Learner
  • Profession: IT Engineer now retired
Bash script console logging (for Clone and Dev mirroring)
« on: October 11, 2026, 02:53:40 PM »
📎 Click on me to view all my attachments
ListAttBBC  |  v6.12  |  2026-09-10  |  Andrew.human & Claude.ai
#FileSizeDownloadsInfoDL
00Bash script console logging - Claude.pdf  [native]770.7 KB2ℹ️⬇️
01.bashrc_Dev5.9 KB0ℹ️⬇️
02.bashrc_Clone6.1 KB1ℹ️⬇️


📝 Inline Markdownv4.5.1 · 2026-10-02

Claude: [October 11, 2026, 06:01:00 PM]

On CentOS 6, /bin is a real directory (not a symlink to /usr/bin as on newer distros), so the standard values are:

  • /bin directory itself: 755, owned root:root.
  • Stock binaries inside it: 755. A few are setuid root and must stay that way: su, mount, umount, ping, ping6 (4755).
  • Your own scripts (mirrorISE_Clone, json_push_audio_Clone_to_Live and the rest): 755 if anyone other than root may run them, or 700 if they are root-only. Given they're operational scripts, 700 or 750 is the tighter choice, especially any that embed credentials or paths into the live system.

Don't use 777 or any group/world-writable bit on /bin or anything in it. Anyone who can write there can replace a command that root runs.

To audit what's currently loose:

find /bin -perm /022 ! -type l

That lists anything writable by group or others, and it should come back empty. To see the setuid/setgid files:

find /bin -perm /6000 ! -type l

Claude: [October 11, 2026, 06:11:45 PM]

Yes, root:root for everything in /bin, applied to the directory and all its members:

chown root:root /bin
chown -R root:root /bin

On CentOS 6, chown -R doesn't follow symlinks by default, so it changes the link itself, not its target. That's the safe behaviour here.

Check for strays first, since it shows which files weren't root:root before you flatten them:

find /bin ! -user root -o ! -group root

If your own scripts were deliberately owned by someone else (a service account, say), that list will show them, and a blanket chown -R would overwrite that. If it comes back empty, the recursive chown changes nothing and is harmless.

If you also want the permissions normalised in one pass, directories and plain files can be handled separately so the setuid bits and executables aren't disturbed. Leave chmod -R alone on /bin, because a blanket chmod -R 755 would strip 4755 from su, mount, umount and ping.

« Last Edit: October 11, 2026, 06:23:56 PM by Chip »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal