Skip to content

TIL that if you inadvertently alter the permissions of /, you're gonna have a bad time.

I've been tinkering with an install of Arch Linux and, somehow, things stopped working correctly. I could still boot into the system, but most of the boot services were failing, much to my bewilderment. I tried fsck, I checked and re-checked the permissions and syntax of many configuration files, until it dawned on me that I should check the permissions of the root. Much to my surprise, I found that the permissions were 0644 rather than 0755. A quick fix solved everything and prevented a needless reinstall.

TL;DR I'm a dumbass and shouldn't be allowed to use Linux.

41 points32 comments
Open on Reddit
About this post
Posted
Archived
Score
41 · 100% up
Kind
Text
ID
ui30b

Author

1
posts
23
comments
0
media
View profile

35 comments

Don't worry about it. Breaking your system is the best way to learn Linux!

47 points
unknown author

this is very true. every break brings wisdom.

17 points
unknown author4 hidden

I'm actually a longtime Linux user, I've just never managed to break my system in this particular fashion. Imagine my surprise when I was forced to admit that I still don't know everything there is to know.

5 points
unknown author

Deleted before we saved it.

5 points

Is it..? Breaking your system once for every possible way to break your system sounds very time consuming to me. I prefer to learn without breaking anything. Sure, without the drama I will sometimes forget things, but the saved hours should be plenty to relearn those.

2 points

In my humble opinion even though it is time consuming to break your system, you will learn a lot from it. You often learn things that are unrelated to the crash, and you learn you how to fix problems and do troubleshooting which is an important skill in many circumstances.

If you just get the answer from internet or posting in a forum, you will not learn as much as if you manage to solve the problem yourself, hence you will not be as efficient when using your computer.

7 points
unknown author

I'm with you. No sense in intentionally fucking up your system. I don't have time for that.

3 points

Not sure why you are 0 points when I got to your post, I knew this has bad consequences.

Why? Because quite a while ago somebody I know broke their system doing this and told me about it, so I don't have to break my system this way. In this case breaking my system is not he best way to learn, I can just learn from somebody else's mistakes.

1 points

Okay, admit it. You just tried to make them feel better.

1 points
unknown author

I concur; just remember to keep routine backups of anything you don't want to lose, and you'll be fine!

0 points
$chmod -R 660 .

oh fuck, I was in / !

$chmod -R +x /
-bash: chmod: permission denied
halt
-bash: halt: permission denied

Sigh. unplug

16 points
unknown author1 hidden

Deleted before we saved it.

1 points

Nah, I just reinstalled. I just copied my /etc partition first, and in half an hour my server was back and running.

1 points
unknown author

Deleted before we saved it.

1 points

$chmod -R 660 .

permission denied: /

( good thing I don't randomly sit around as root)

1 points

I was once developing a website on my localhost, but my user account didn't have the right permisions for /var/www. It took me a while to figure out how to set permissions.

And then it seemed like a good idea to just set every single file and folder on my system to 0777. I'd never have any issues with permissions ever again! So chmod -R 0777 / it was.

And then pretty much everything stopped working.

13 points
unknown author1 hidden

Most security software expects certain files and directories to have certain permissions, so this isn't surprising.

5 points

I ended up reinstalling linux, I was getting too many of errors. I started out resetting all the permissions, but that was just way too time consuming.

I did learn a lot about permissions in the process, so that's something.

2 points

This is what happened to me a few weeks ago.

I saw that Ubuntu (or something else Debian) symlinked /lib64 to /lib on a 64 bit system. In a moment of epiphany, I thought "what a neat idea, let me do this on all my ArchLinux machines".

About a week or two after that, there was an update to a library in /lib which also had to be symlinked to /lib64. The library happened to be ld-linux-x86-64.so As you can imagine, the original library was replaced by the symlink and this is when shit hit the fan.

You have to understand that I did not immediately know what happened as all of my binaries stopped working. The system would not boot. Checking the error logs from a live session was not helpful. I asked on the IRC, people genuinely offered the best of their knowledge. But in the end, I was asked to wipe the system.

Not wanting to give up just yet, and looking at the pacman log (as suggested by a really helpful fellow archer), I read something about symlinks and remembered the stupid hack I made weeks ago.

Thank fully, I had my older laptop with a similar setup and packages. I removed /lib and /lib64 and rsync'd that shit (dangerous I know, but better than wiping the hard disk and starting over).

Mentioned this on the IRC, and many lol's were had.

Shitty part: I did the same on two of my work computers and forgot about it. The update killed both of them.

TL;DR Symlinked /lib and /lib64. Broke everything. On three computers. rsync saved the day.

11 points
unknown author

Yeah, the symlinking of lib to lib64 is for multilib machines.

1 points

chown -R www-data:www-data /

I did this on a box my friend used for her hosting company.

7 points
unknown author

Oh that made me cringe...

3 points

TL;DR I'm a dumbass and shouldn't be allowed to use Linux.

Nope. You're a user who just learned something. :)

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.