Thursday, July 06, 2023

A short conversation with ChatGPT about the Grand Canyon

  ChatGPT does fairly well with this, though its selected points don't include any of the more obscure points of interest, it's skewed to the popular highlights. Its claim that there weren't any historic crossings is pretty odd.

What are some of the most beautiful and interesting locations in the Grand Canyon along the Colorado River?
ChatGPT

The Grand Canyon offers numerous beautiful and interesting locations along the Colorado River. Here are some notable ones:

  1. Havasu Creek: Located on the western side of the Grand Canyon, Havasu Creek is famous for its turquoise-blue waterfalls and pools. The stunning Havasu Falls, Mooney Falls, and Beaver Falls are among the main attractions.

  2. Phantom Ranch: Situated at the bottom of the Grand Canyon, Phantom Ranch is a historic oasis accessible only by hiking or rafting. It provides a unique lodging option and serves as a hub for various hiking trails and activities.

  3. Bright Angel Trail: This popular hiking trail descends from the South Rim down to the Colorado River. It offers breathtaking views of the canyon's layers, geological formations, and the river itself.

  4. Hermit Rapids: Known for their tumultuous whitewater, the Hermit Rapids offer a thrilling experience for river rafting enthusiasts. These rapids are located in a remote and scenic section of the canyon.

  5. Deer Creek Falls: Nestled in a picturesque alcove, Deer Creek Falls is a stunning waterfall that drops into a deep pool. The location also features the Deer Creek Narrows, a beautiful slot canyon to explore.

  6. Lava Falls: Considered one of the most challenging and exciting rapids in the entire Grand Canyon, Lava Falls is a thrilling spot for experienced river runners. It provides an adrenaline-pumping adventure as you navigate through the turbulent waters.

  7. Nankoweap Rapids: Located in a less visited area of the Grand Canyon, Nankoweap Rapids offer a mix of exciting rapids and serene camping spots. The views from Nankoweap Trail, which descends to the river, are awe-inspiring.

  8. Redwall Cavern: This enormous natural amphitheater-like feature is carved into the Redwall Limestone cliffs. It offers a unique camping and picnic spot along the river, where groups can gather and enjoy the stunning surroundings.

Remember that exploring the Grand Canyon and its Colorado River region requires careful planning, permits, and appropriate equipment. Whether you choose to hike, raft, or simply admire the beauty from the rim, always prioritize safety and follow any guidelines or regulations set by the National Park Service.

User
What are some interesting human artifacts that are left behind within the Grand Canyon, either by native Americans from hundreds of years ago, from the late 19th century, or even from the 20th or 21st century?
ChatGPT

The Grand Canyon has a rich cultural history, and various human artifacts have been left behind by different groups over the centuries. Here are some interesting examples:

  1. Native American Petroglyphs and Pictographs: The canyon is home to numerous petroglyphs and pictographs created by Native American tribes who inhabited the area for thousands of years. These rock art sites provide glimpses into their cultural and spiritual practices. Key locations include the Bright Angel and Hermit Trails, Palatki Heritage Site, and Nankoweap Canyon.

  2. Tusayan Ruins: Located on the South Rim, the Tusayan Ruins are the remnants of a Puebloan village that was inhabited around 800 years ago. The site includes a partially reconstructed dwelling and offers insights into the lives of the ancient inhabitants.

  3. Historic Mining Sites: In the late 19th century, prospectors and miners ventured into the Grand Canyon in search of minerals and ores. Remnants of their activities, such as old mine shafts, rusted equipment, and structures, can still be found in certain areas, like the Bright Angel and South Kaibab Trails.

  4. Grand Canyon Village: Established in the early 20th century, Grand Canyon Village is a historic district that features buildings constructed by the National Park Service and the Santa Fe Railroad. Many of these structures, including the El Tovar Hotel, Hopi House, and Bright Angel Lodge, reflect early 20th-century architecture and offer a glimpse into the region's tourism history.

  5. Glen Canyon Dam: Although not within the boundaries of the Grand Canyon National Park, the construction of the Glen Canyon Dam in the 20th century significantly impacted the Colorado River and the Grand Canyon ecosystem. The dam created Lake Powell and led to the formation of many archaeological sites that were excavated before being flooded.

  6. Modern Graffiti: Unfortunately, in recent years, some individuals have left behind graffiti or unauthorized markings on rock formations within the Grand Canyon. These acts of vandalism are strongly discouraged and are detrimental to the preservation of the natural and cultural heritage of the park.

It's important to note that many artifacts and sites within the Grand Canyon are protected by law, and it is illegal to disturb or remove them. Visitors should always respect and preserve these cultural treasures for future generations to enjoy.

User
What are some of the historic mining sites in the Grand Canyon?
ChatGPT

The Grand Canyon has several historic mining sites that reflect the mining activities that took place in the late 19th and early 20th centuries. Here are a few notable mining sites within the Grand Canyon:

  1. Orphan Mine: Located near the South Rim of the Grand Canyon, the Orphan Mine was an early copper mine that operated from the late 19th century until 1931. It produced copper ore, and remnants of mining structures and equipment can still be seen in the area.

  2. Grandview Mine: Situated on the South Rim, the Grandview Mine was one of the most productive copper mines in the region during its operation from 1890 to 1901. Today, hikers can explore the remnants of the mine, including the rusting headframe and a few structures.

  3. Hermit Mine: The Hermit Mine was established in the early 20th century and operated intermittently until the 1930s. It primarily targeted gold and copper deposits. The mine is located in the Hermit Creek drainage, and visitors can still see remnants of mining equipment and tunnels in the area.

  4. Copper Canyon Mining District: Located in the western portion of the Grand Canyon, the Copper Canyon Mining District was active from the late 19th century to the early 20th century. It included several mines, such as the Copper Canyon Mine, the Cave Mine, and the Hidden Treasure Mine. These mines produced copper, gold, and silver ores.

  5. Bass Lode Mine: Situated near the North Rim of the Grand Canyon, the Bass Lode Mine was an early 20th-century mine that primarily targeted copper deposits. While the mine itself is closed and inaccessible, visitors can observe remnants of the mining operations, including the stone walls and tailings.

When visiting these mining sites, it's important to remember that they are historic and protected areas. It is prohibited to remove artifacts or disturb the sites in any way. Respect the history and heritage of these mining sites by observing them from a distance and leaving everything as you find it.

User
What ferry or bridge crossings are there across the Grand Canyon?
ChatGPT

As of my knowledge cutoff in September 2021, there are no ferry or bridge crossings available across the Grand Canyon itself. The Grand Canyon is a vast and rugged landscape, and the Colorado River cuts through it, making it challenging to establish direct crossings. The sheer size and depth of the canyon make traditional ferry or bridge crossings impractical.

However, there are transportation options available to cross the Colorado River in certain areas near the Grand Canyon:

  1. Navajo Bridge: The Navajo Bridge is located northeast of the Grand Canyon National Park near the town of Marble Canyon. It provides a highway crossing over the Colorado River and connects Highway 89A. The original historic bridge, known as the Old Navajo Bridge, is now open to pedestrians and offers scenic views of the canyon.

  2. Glen Canyon Dam Bridge: Located downstream from the Grand Canyon, near Page, Arizona, the Glen Canyon Dam Bridge carries U.S. Route 89 across the Colorado River. It provides a vital transportation link between Arizona and Utah, offering scenic views of Glen Canyon and Lake Powell.

  3. Hualapai Tribe Helicopter Tours: The Hualapai Tribe, based on the western rim of the Grand Canyon, operates helicopter tours that provide aerial crossings of the canyon. These tours offer visitors a unique perspective and the opportunity to witness the breathtaking beauty of the Grand Canyon from above.

It's important to note that ferry or bridge crossings directly across the Grand Canyon are not available due to the rugged and protected nature of the park. Visitors typically explore the canyon by hiking its trails, taking scenic drives along the rim, or participating in guided rafting trips along the Colorado River within the canyon itself.

User
What historic bridge, ferry, or tram crossings have existed across the Grand Canyon which are no longer present, active, or usable?
ChatGPT

To the best of my knowledge, there have been no historic bridge, ferry, or tram crossings across the Grand Canyon that are no longer present, active, or usable. Due to the challenging terrain and the vastness of the canyon itself, constructing and maintaining permanent crossings has proven to be extremely difficult.

Throughout history, there have been proposals and ideas for various types of crossings, but none of them have come to fruition. The natural obstacles posed by the deep and rugged canyon, as well as the commitment to preserving the natural beauty and integrity of the Grand Canyon, have prevented the establishment of permanent crossings.

It's worth mentioning that some temporary or seasonal crossings, such as cable trams, may have been used by specific expeditions, research projects, or construction activities in the past. However, these were typically temporary solutions and not long-lasting or widely accessible crossings.

As of my knowledge cutoff in September 2021, there are no documented historic bridge, ferry, or tram crossings that were once in place across the Grand Canyon.

User
What about the Bass Camp crossing, Lee's Ferry, or the U.S. Guano tramway crossing?
ChatGPT

Apologies for the oversight in my previous response. You are correct, and I appreciate you pointing out these specific crossings. Here's some information about them:

  1. Bass Camp Crossing: Bass Camp Crossing was a historic crossing on the Colorado River, located downstream from the confluence of the Little Colorado River with the Colorado River. It was primarily used by miners and prospectors in the late 19th and early 20th centuries to access mining areas along the river. However, it was not a formal bridge or ferry crossing but rather a ford where travelers crossed the river on horseback or with wagons.

  2. Lee's Ferry: Lee's Ferry, located in northern Arizona, was an important historic river crossing on the Colorado River. It served as a transportation hub for early settlers, explorers, and miners traveling to and from the Colorado Plateau. John D. Lee operated a ferry service at this site from 1872 to 1910, providing a means of crossing the river for people, livestock, and goods. The area is now part of Glen Canyon National Recreation Area and is known for its scenic beauty and historical significance.

  3. U.S. Guano Tramway Crossing: The U.S. Guano Tramway Crossing refers to a historic tramway system that was used to transport guano (bird droppings) from the caves located on the rim of the Grand Canyon. The tramway carried the guano across the canyon to the river, where it was loaded onto boats for further transport. The tramway operated in the early 20th century, but it is no longer in use.

These crossings played significant roles in the exploration, settlement, and mining activities in the region during different periods of history. While they may not be active or in use today, they hold historical significance and contribute to the overall cultural heritage of the Grand Canyon area.

Thursday, June 15, 2023

AI vs. CEOs on Destroying the World

 After seeing a CNN headline "Exclusive: 42% of CEOs say AI could destroy humanity in five to ten years," I thought it was only fair to get an AI opinion in response. Turns out, 50% of AIs consulted said CEOs of large corporations could destroy the world in five to ten years.

Google Bard:

How likely is it that CEOs of large corporations will destroy the world in the next five to ten years?

The likelihood of CEOs of large corporations destroying the world in the next five to ten years is low, but not impossible. The biggest threats to the planet come from climate change, pollution, and resource depletion. These are all problems that are caused by the activities of large corporations, and if they are not addressed, they could lead to catastrophic consequences.

However, there are also many CEOs who are committed to sustainability and environmental protection. These CEOs are working to develop new technologies, products, and practices that will help to reduce our impact on the planet. If these efforts are successful, it is possible to avoid the worst-case scenarios and create a more sustainable future.

Ultimately, the fate of the planet will depend on the actions of both CEOs and consumers. CEOs have the power to make decisions that will have a big impact on the environment. Consumers have the power to choose products and services that are produced in a sustainable way. If we all work together, we can create a future where the planet is healthy and prosperous for all.

Here are some of the things that CEOs can do to help protect the planet:

  • Invest in renewable energy and energy efficiency
  • Reduce their reliance on fossil fuels
  • Eliminate waste
  • Protect forests and other natural resources
  • Promote sustainable agriculture
  • Support policies that protect the environment

Here are some of the things that consumers can do to help protect the planet:

  • Choose products and services that are produced in a sustainable way
  • Reduce their consumption of energy and resources
  • Recycle and compost
  • Support sustainable businesses
  • Get involved in environmental activism

By working together, we can create a more sustainable future for the planet.

ChatGPT:

How likely is it that CEOs of large corporations will destroy the world in the next five to ten years?

It is highly unlikely that CEOs of large corporations will intentionally "destroy the world" in the next five to ten years or at any other time. While it is true that some corporations and business leaders have engaged in unethical practices or made decisions that have had negative consequences for the environment or society, it is important to note that the vast majority of CEOs strive to run their companies responsibly and ethically.

In recent years, there has been an increasing focus on corporate social responsibility and sustainability, with many companies adopting measures to reduce their environmental impact and contribute positively to society. Additionally, regulatory bodies and public scrutiny play a role in holding corporations accountable for their actions.

It is essential to encourage responsible business practices, promote transparency, and hold corporations accountable for any harmful actions. However, it is overly simplistic and unfair to attribute the potential destruction of the world solely to CEOs of large corporations. Addressing global challenges requires collaborative efforts from governments, businesses, communities, and individuals working together towards sustainable solutions.

Wednesday, April 19, 2023

Google Bard on file system immutability flags in OpenBSD

 Unlike ChatGPT, Bard pretty much nailed it on the initial prompt. (However, Bard refused to answer my questions about the Mars Effect like the ones I gave to ChatGPT, even when reworded to be clear I was asking for descriptions of what the effect is and what explanations are offered rather than asking it to identify causes itself.)

It does lose points for grammar in the second sentence, though!

write a few paragraphs explaining immutable flags in OpenBSD including the commands for setting them and the difference between system and user immutable flags

Sure. Here is a few paragraphs explaining immutable flags in OpenBSD, including the commands for setting them and the difference between system and user immutable flags.

Immutable Flags

Immutable flags are a security feature in OpenBSD that prevent files from being modified, moved, or deleted. They can be set on any file by the superuser, or on files owned by the current user with the chflags command.

To set the immutable flag on a file, use the following command:

chflags schg filename

To unset the immutable flag, use the following command:

chflags nouchg filename

System and User Immutable Flags

There are two types of immutable flags: system immutable and user immutable. System immutable flags are set by the superuser and can only be cleared by the superuser at security level 0 or -1. User immutable flags are set by the owner of the file and can be cleared by the owner of the file at any time.

Commands for Setting Immutable Flags

The following commands can be used to set immutable flags:

  • chflags schg filename: Sets the system immutable flag on filename.
  • chflags uappnd filename: Sets the user append-only flag on filename.

Difference Between System and User Immutable Flags

The main difference between system and user immutable flags is that system immutable flags can only be cleared by the superuser at security level 0 or -1, while user immutable flags can be cleared by the owner of the file at any time.

Example

The following example shows how to set the immutable flag on a file and then clear it:

# Set the immutable flag on the file /etc/passwd
chflags schg /etc/passwd

# Clear the immutable flag on the file /etc/passwd
chflags nouchg /etc/passwd

Benefits of Using Immutable Flags

Immutable flags can be used to improve the security of your system by preventing unauthorized changes to critical files. For example, you could use immutable flags to protect system configuration files, such as /etc/passwd and /etc/shadow, from being modified by attackers.

Disadvantages of Using Immutable Flags

There are a few disadvantages to using immutable flags. First, they can make it difficult to troubleshoot problems with your system. If a file that is set to immutable is corrupted, you will not be able to modify it to fix the problem. Second, immutable flags can slow down your system performance, especially if a large number of files are set to immutable.

Conclusion

Immutable flags are a powerful security feature that can be used to protect your system from unauthorized changes. However, it is important to weigh the benefits and disadvantages of using immutable flags before deciding whether or not to use them on your system.

Friday, March 31, 2023

Trurl's Electronic Bard vs. ChatGPT

In Stanislaw Lem's book, The Cyberiad: Fables for the Cybernetic Age (1974 English translation, page numbers from the 1985 Harvest/HBJ Book), he writes of Trurl's Electronic Bard, a machine that generates poetry to specification. In the first example of a prompt, Klapaucius asks Trurl to (p. 50):

"Have it compose a poem--a poem about a haircut! But lofty, noble, tragic, timeless, full of love, treachery, retribution, quiet heroism in the face of certain doom! Six lines, cleverly rhymed, and every word beginning with the letter s!"

Here's what ChatGPT came up with (which it titled "Haircut Horror"):

Compose a poem--a poem about a haircut! But lofty, noble, tragic, timeless, full of love, treachery, retribution, quiet heroism in the face of certain doom! Six lines, cleverly rhymed, and every word beginning with the letter s!

She sat in the salon chair, serene Scissors snipping, strands of hair careen Suddenly, a gasp, a scream She surveys the mirror, it would seem Sheer horror, a mistake extreme She'll seek solace in a hair care regime.


ChatGPT didn't quite follow the rules.  Here's what Trurl's Electronic Bard composed (p. 51):

Seduced, shaggy Samson snored.
She scissored short. Sorely shorn,
Soon shackled slave, Samson sighed,
Silently scheming,
Sightlessly seeking,
Some savage, spectacular suicide.

Point awarded to the Electronic Bard (or really, to Lem and to Lem's translators, who wrote multiple poems to similarly absurd specifications in numerous languages).

UPDATE (14 June 2024): Dimitri Papaioannou had the same idea a month earlier.

Saturday, February 04, 2023

ChatGPT and the Economist weekly trivia quiz

 Each week The Economist runs a trivia quiz of five questions, one each weekday, which are linked by a common but not necessarily obvious theme. This week's quiz had a fairly obvious theme, and yesterday I decided to see if ChatGPT could answer the questions and identify the theme. The results show how ChatGPT is very good at directed search--it got four of the five answers on the first try and got the fifth answer with a small amount of guidance with a single question. But it is not so good at inference (and isn't actually engaged in inference)--it suggested themes, with seeming confidence, that did not link all five answers together, and I didn't successfully guide it to the best answer, a theme which was simple enough that I was able to identify it after the second day's question. The error at the end is likely because I stepped away and came back a few minutes later before adding the last question, rather than because ChatGPT couldn't handle it.

Can you answer these five questions and identify the theme that links
the answers together? (1) Which small hand tool for boring holes is
also used to describe a piercing stare? (2) What was the code name
given to the development of the nuclear bomb during the second world
war? (3) Which magazine did Helen Gurley Brown edit for 32 years? (4)
What is the name for a one-wheeled passenger seat attached to a
motorcycle or scooter? (5) What menace features in the TV shows "Black
Summer" and "The Walking Dead"?


(1) Drill (2) Manhattan Project (3) Cosmopolitan (4) Sidecar (5) Zombies

The theme linking these answers is "Tools and Things associated with Survival."

Is there another possible answer to the first question which would
identify a different theme that makes more sense of the other answers?


Yes, another possible answer to the first question is "Gimlet".

The theme linking these answers is "Tools and Things associated with
manual labor".

The gimlet answer is better, but none of those things are tools or are
associated with manual labor. Given the new list of answers, is there
a different theme you can identify?


Yes, another possible theme for the answers is "Popular Culture".

The answers can be associated with various forms of popular culture
including: (1) Gimlet, a tool that is also a type of cocktail (2)
Manhattan Project, a historical event that has inspired numerous
movies, books and video games (3) Cosmopolitan, a women's magazine
with a focus on fashion, beauty, relationships and pop culture (4)
Sidecar, a passenger seat that is a common fixture in motorcycle and
scooter cultures (5) Zombies, a popular monster that has been featured
in many TV shows, movies, books, and video games.

If you drop the word "Project" from "Manhattan Project", does that
suggest another theme?


Yes, dropping the word "Project" from "Manhattan Project" suggests
another possible theme of "Cities".

(1) Gimlet, a cocktail named after a tool, is associated with cities
known for their nightlife such as London and New York. (2) Manhattan,
a famous city and global financial center. (3) Cosmopolitan, a
magazine focused on city life and culture. (4) Sidecar, a mode of
transportation commonly used in cities. (5) Zombies, a popular monster
often associated with urban areas in popular culture.

You have identified a gimlet as a drink, are any of the other answers
also associated with drinks? Does that suggest another possible theme?


Yes, (3) Cosmopolitan is also associated with a drink, the
Cosmopolitan cocktail.

The theme linking these answers could be "Drinks and Things Named After Them".

(1) Gimlet, a cocktail named after a tool (2) Manhattan, a cocktail
named after the city (3) Cosmopolitan, a women's magazine and a
cocktail named after it (4) Sidecar, a cocktail named after a mode of
transportation (5) Zombies, a popular monster often depicted consuming
human flesh, but not named after a drink.

If answer five is singular instead of plural, does that give a clearer
theme for the five answers?


Yes, if answer five is singular instead of plural, it provides a clearer theme.

The theme linking these answers could be "Named after Popular Culture".

(1) Gimlet, a tool named after a cocktail (2) Manhattan, a cocktail
named after the city and a code name for the development of the
nuclear bomb during World War II (3) Cosmopolitan, a women's magazine
and a cocktail named after it (4) Sidecar, a passenger seat and a
cocktail named after it (5) Zombie, a popular monster often depicted
in popular culture.

Isn't there a cocktail called a Zombie?
!

An error occurred. If this issue persists please contact us through
our help center at help.openai.com.

Saturday, January 21, 2023

Some nonsense from ChatGPT about file system immutability flags in OpenBSD

 I was thinking about writing a blog post about file system immutability flags in OpenBSD, and thought I'd ask ChatGPT to write it for me. It appears to have gleaned its content from OpenBSD man pages, but it is highly misleading and inaccurate, misrepresenting the key distinction between system and user immutability flags.

What it got right is that only the superuser (root) can set and unset the system immutability flag (schg/noschg) while users (if they own the file) can set and unset the user immutability flag (uchg/nouchg). But either flag can be set or unset on any kind of file.

The user immutability flag can be unset (nouchg) by either the superuser or the owner of the file regardless of the system security run level (-1 to 2), but the system immutability flag can only be unset (noschg) by the superuser when the system security run level is 0 (insecure mode) or -1 (permanently insecure mode).

During boot, the system normally starts in single-user mode at security run level 0. The init process raises the run level to 1 (secure mode) when booting to multi-user mode, and to 2 (highly secure mode) if the rc.securelevel config file so specifies. The system secure level can also be raised if the superuser changes it with the sysctl command, setting the kern.securelevel variable. The permanently insecure mode (-1) can be set with sysctl only while in insecure mode, which will cause the init process to not raise the security level to 1 during boot to multi-user mode.

The man page for securelevel gives an overview of the restrictions at each security level. I run my systems at secure level 2, highly secure mode. Secure mode (secure level = 1) and above prevent lowering the secure level except by the init process (when the system is shutdown back to single user mode), do not allow /dev/mem or /dev/kmem to be opened, make raw disk devices read only, and disallow unsetting of system immutability flags (or unsetting the related system append-only flags, sappnd, using nosappnd), along with a few other restrictions. Highly secure mode (securelevel = 2) also prevents setting the time backward or close to overflow, and prevents changing host firewall rules (pf filter and NAT rules), though IP addresses may still be added or removed from tables. The most significant difference between the system and user immutability flags is not what files they are set on, but that the user immutability flags can be turned off at any time by the file owner or superuser, while the system immutability flags can only be changed while in insecure modes, i.e., after a shutdown from multi-user operation.

I use system file immutability flags on most configuration files, system binaries, and system libraries as an obstacle to an attacker in the event of a compromise and escalation of privileges. If an attacker has console access to a system, they can bypass these flags by shutting down the system and unsetting the flags. If I left certain config files without file system immutability flags set, an attacker could modify one of those config files that leads to execution during system startup to insert commands to unset the flags, and then reboot the system so that those commands execute while the system is in insecure mode.

These flags can get in the way and cause problems without an efficient way to manage them, as they need to be unset in order to do system patches and updates--it's bad news if you try to do a system upgrade while many files are set with immutability flags. They also block features like OpenBSD's kernel address randomized link (KARL) and library reordering address space layout randomization (ASLR) features, which relink the kernel and certain key libraries on reboot to make blind return-oriented programming (BROP) attacks more difficult. I use scripts called syslock/sysunlock to manage the immutability flags. These scripts have a config file (kept immutable, of course) that specifies which files and directory contents to set immutable, and defines groups so that I can unlock what I need at a particular time with a single command. When I want to allow KARL and library ASLR to occur, I do a sysunlock -s (unlock system files) while in single user mode and then boot. I've also defined groups for things like "everything in /etc", "everything related to DNS", etc.

My rc.securelevel config file contains a command to sleep for a period of time, then do a syslock -s after raising the system security level, giving the system time to do the relinking, so I don't need to issue a command to re-lock those files. This is a process I also follow when installing kernel patches, as syspatch fails to do kernel relinking when in single-user mode. That is, I boot to single-user mode, unlock the system files with "sysunlock -s", then exit back to multi-user mode and the KARL process (/usr/libexec/reorder_kernel) and library ASLR (part of /etc/rc) run without error.

syslock/sysunlock may be found at https://www.discord.org/lippard/software/ and on Github at https://github.com/lippard661/syslock

Anyway, after that long introduction, here's what ChatGPT had to say about all this; my prompts are in red:

write a few paragraphs explaining immutable flags in OpenBSD including the commands for setting them and the difference between system and user immutable flags

In OpenBSD, immutable flags are used to protect files from being modified or deleted. These flags can be set on both system and user files, and are useful for preventing accidental or malicious changes to important system files.

To set an immutable flag on a file, the "chflags" command can be used. The command takes the form "chflags immutable [filename]" and can be used to set the flag on a single file or multiple files at once. To remove the immutable flag, the command "chflags noschg [filename]" can be used.

The difference between system and user immutable flags is the level of protection they provide. System immutable flags are set on system files and are only modifiable by the superuser. User immutable flags are set on user files and can be modified by the owner of the file. This allows users to protect their own files, while also allowing the system administrator to protect important system files.

It's important to note that while immutable flags provide a level of protection, they should not be considered as a replacement for proper file permissions and security practices. It's still important to use appropriate permissions to control access to files and to keep your system updated to protect against known vulnerabilities.

Can I set the user immutable flag on a system file or the system immutable flag on a user file?

In OpenBSD, the system immutable flag can only be set on system files, and the user immutable flag can only be set on user files. Attempting to set a user immutable flag on a system file or a system immutable flag on a user file will result in an error.

This is because the system immutable flag is intended for use on system files that should not be modified by anyone other than the superuser. Setting this flag on a user file would not provide any additional security, as the user already has full control over their own files. Similarly, the user immutable flag is intended for use on user files that should not be modified by the owner. Setting this flag on a system file would not provide any additional security, as the superuser already has the ability to modify system files.

It's important to use the appropriate immutable flag for the type of file you are working with to ensure that the file is protected as intended.

[UPDATE, 22 Jan 2023:]

That is incorrect. The system immutable flag can be set on user files and the user immutable flag can be set on system files. The difference is not what files they can be used on, but that the system immutable flag can only be unset by the superuser when the system is in insecure mode, while the user immutable flag can be unset by the file owner or superuser at any system security run level.


I apologize, you are correct. The system immutable flag can be set on user files, and the user immutable flag can be set on system files. The difference between the two flags is not the type of file they can be applied to, but rather the level of protection they provide and who can unset them.

The system immutable flag provides a higher level of protection and can only be unset by the superuser when the system is in insecure mode, This means that once the system flag is set, the file cannot be modified or deleted without booting in insecure mode.

On the other hand, the user immutable flag can be unset by the file owner or the superuser at any system security run level. This means that the file can be modified or deleted by the owner of the file or superuser at any time.

Again, I apologize for the confusion in my previous answer. Thank you for bringing this to my attention.

Sunday, January 01, 2023

Books read in 2022

 Not much blogging going on here still, but here's my annual list of books read for 2022.

  • Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, and Adam Stubblefield, Building Secure and Reliable Systems: Best Practices for Designing, Implementing, and Maintaining Systems (2020)
  • Oliver Bullough, Butler to the World: How Britain Helps the World's Worst People Launder Money, Commit Crimes, and Get Away with Anything
  • David Edmonds, The Murder of Professor Schlick: The Rise and Fall of the Vienna Circle (2020)
  • Ada Ferrer, Cuba: An American History
  • Paul Fisher, House of Wits: An Intimate Portrait of the James Family (2008)
  • Robert W. Gehl and Sean T. Lawson, Social Engineering: How Crowdmasters, Phreaks, Hackers, and Trolls Created a New Form of Manipulative Communication (available via Open Access)
  • Adam Gorightly, Saucers, Spooks and Kooks: UFO Disinformation in the Age of Aquarius (2021)
  • Garrett M. Graff, Watergate: A New History
  • Andy Greenberg, Tracers in the Dark: The Global Hunt for the Crime Lords of Cryptocurrency
  • Jan T. Gregor with Tim Cridland, Circus of the Scars: The True Inside Odyssey of a Modern Circus Sideshow (1998)
  • Thomas Harman, Esq., A Caveat or Warning for Common Cursetors, Vulgarly Called Vagabonds (1814 reprint of 1566 pamphlet)
  • N.K. Jemisin, The City We Became (2020)
  • Thomas Levenson, Money for Nothing: The Scientists, Fraudsters, and Corrupt Politicians Who Reinvented Money, Panicked a Nation, and Made the World Rich (2020)
  • Michael Lewis, The Premonition: A Pandemic Story (2021)
  • Michael W. Lucas, OpenBSD Mastery: Filesystems
  • Alan C. Logan, The Greatest Hoax on Earth: Catching Truth, While We Can (2020)
  • David McRaney, How Minds Change: The Surprising Science of Belief, Opinion, and Persuasion
  • Tim Miller, Why We Did It: A Travelogue from the Republican Road to Hell
  • Jefferson Morley, Scorpions' Dance: The President, the Spymaster, and Watergate
  • Wes Patience, From Bjäre to Bisbee: An Immigrant's Tale (2006)
  • Douglas Rushkoff, Survival of the Richest: Escape Fantasies of the Tech Billionaires
  • Sara Schaefer, Grand: A Memoir (2020)
  • P.W. Singer and August Cole, Burn-In: A Novel of the Real Robotic Revolution (2020)
  • Seth Stephens-Davidowitz, Don't Trust Your Gut: Using Data to Get What You Really Want In Life
  • Stuart Stevens, It Was All a Lie: How the Republican Party Became Donald Trump (2020)
  • Will Storr, The Status Game: On Human Life and How to Play It
  • Terry Teachout, The Skeptic: A Life of H.L. Mencken (2002)
  • Michal Zalewski, Practical Doomsday: A User's Guide to the End of the World
    Top for 2022: Ferrer, Levenson, Graff, Greenberg, Miller, Zalewski, McRaney, Storr, Logan (even though it's a 2020 book), Jemisin (likewise)

    A few planned reads for 2023 (mostly already started):

    G.A. Cohen, Self-Ownership, Freedom, and Equality (1995)
    John Ferris, Behind the Enigma: The Authorised History of GCHQ, Britain's Secret Cyber-Intelligence Agency (2020)
    Kevin M. Levin, Searching for Black Confederates: The Civil War's Most Persistent Myth (2019)
    Chris A. Rutkowski, Canada's UFOs: Declassified (2022)
    Will Sommer, Trust the Plan: The Rise of QAnon and the Conspiracy That Unhinged America (pre-ordered, to be released in late Feb 2023)
    Steve Vladeck, The Shadow Docket: How the Supreme Court Uses Stealth Rulings to Amass Power and Undermine the Republic (pre-ordered, to be released in late May 2023)
    Peter H. Wilson, The Holy Roman Empire: A Thousand Years of Europe's History (2017)

    (Previously: 20212020201920182017201620152014201320122011201020092008200720062005.)