RetroFed Forum
Your home away from modern life.
It's all about those little file mode bits
Post Reply
AuthorMessage
alecsargent lemmy.zip alecsargent@lemmy.zip
Joined: 2025-08-13
(edited) Quote

249   Original
rumschlumpel feddit.org rumschlumpel@feddit.org
Joined: 2024-06-23
#2 · Quote Reply

When I start fucking with chmod, it happens way too often that what I want to do only works after I executed chmod 777...

37
renegadespork lemmy.jelliefrontier.net renegadespork@lemmy.jelliefrontier.net
Joined: 2024-12-03
#3 · Quote Reply

When I start fucking with chmod, it happens way too often that what I want to do only works after I executed chmod 777...

May I interest you in a nice “chown”?

54
renegadespork lemmy.jelliefrontier.net renegadespork@lemmy.jelliefrontier.net
Joined: 2024-12-03
#4 · Quote Reply

700 cause I’m selfish.

16
rImITywR lemmy.world rImITywR@lemmy.world
Joined: 2023-06-16
#5 · Quote Reply

When I start fucking with chmod, it happens way too often that what I want to do only works after I executed chmod 777...

chmod -R 777 /

Why the fuck am I still getting permission errors

38
neopenguin lemmy.world neopenguin@lemmy.world
Joined: 2023-06-21
#6 · Quote Reply

If you don't add the leading digit (out of respect) for the sticky/setgid/setuid bits, do you even Linux?

18
renegadespork lemmy.jelliefrontier.net renegadespork@lemmy.jelliefrontier.net
Joined: 2024-12-03
#7 · Quote Reply

chmod -R 777 / Why the fuck am I still getting permission errors

sudo

28
𝘋𝘪𝘳𝘬 lemmy.ml Dirk@lemmy.ml
Joined: 2023-06-09
#8 · Quote Reply

700 cause I’m selfish.

700 is the only sane answer for directories inside $HOME.

8
morto piefed.social morto@piefed.social
Joined: 2025-07-03
#9 · Quote Reply

chmod 666 so only the devil can execute it

64
red_bull_of_juarez lemmy.dbzer0.com red_bull_of_juarez@lemmy.dbzer0.com
Joined: 2025-02-05
#10 · Quote Reply

u=rwX,g=rX,o=rX because this won't make every file executable, only folders.

5
renegadespork lemmy.jelliefrontier.net renegadespork@lemmy.jelliefrontier.net
Joined: 2024-12-03
#11 · Quote Reply

700 is the only sane answer for directories inside $HOME.

Nah, there’s a lot of config files in there that other programs need to read.

5
Maxxie piefed.blahaj.zone Maxxie@piefed.blahaj.zone
Joined: 2025-06-08
#12 · Quote Reply

this but in reverse 🤷‍♀️

31
wheezy lemmy.ml wheezy@lemmy.ml
Joined: 2025-07-02
#13 · Quote Reply

Nah, there’s a lot of config files in there that other programs need to read.

Unfortunately. I really wish $HOME was reserved for files I create myself. I know. I can create my own shit for that. But, I really wish every single random project I download to fuck around with didn't drop a config directory or file in there. ITS MY HOME.

14
gigaqps lemmy.world gigaqps@lemmy.world
Joined: 2026-09-09
#14 · Quote Reply

But those are different

69
Ephera lemmy.ml Ephera@lemmy.ml
Joined: 2020-05-31
#15 · Quote Reply

But those are different

Yeah, not only does +x leave read/write permissions untouched, it also only makes it executable for the user, not for everyone and their cat.

60
Unpigged lemmy.dbzer0.com Unpigged@lemmy.dbzer0.com
Joined: 2023-11-14
#16 · Quote Reply

I like to chmod it chmod it

5
Matty_r programming.dev Matty_r@programming.dev
Joined: 2023-09-23
#17 · Quote Reply

Dont forgot setfacl

2
meekah discuss.tchncs.de meekah@discuss.tchncs.de
Joined: 2025-10-22
#18 · (edited) Quote Reply

Unfortunately. I really wish $HOME was reserved for files I create myself. I know. I can create my own shit for that. But, I really wish every single random project I download to fuck around with didn't drop a config directory or file in there. ITS MY HOME.

I mean, having config files in there makes a lot of sense. It allows you to move your home to some other machine/install and immediately feel at home, because everything is configured to your liking.

Now, the fact that many apps create their own directory instead of putting their stuff in ~/.config is pretty annoying.

13
Mr.Chewy lemmy.world MrChewy@lemmy.world
Joined: 2025-07-22
#19 · Quote Reply

Yeah, not only does +x leave read/write permissions untouched, it also only makes it executable for the user, not for everyone and their cat.

Cat doesn't execute anything tho, it just reads and gives output

26
WFH lemmy.zip Wfh@lemmy.zip
Joined: 2025-06-07
#20 · Quote Reply

chmod -R 600 ~/, because I dont trust anyone, not even myself.

15
eyesaremosaics lemmy.zip eyesaremosaics@lemmy.zip
Joined: 2026-04-23
#21 · Quote Reply

u=rwX,g=rX,o=rX because this won't make every file executable, only folders.

Looks like a handy flag

1
libewa feddit.org libewa@feddit.org
Joined: 2026-07-29
#22 · Quote Reply

700 is the only sane answer for directories inside $HOME.

macOS by default makes /Users/* only readable by the owner, except for $HOME/Public, which is drwxr-xr-x, and $HOME/Public/Postbox, which is drwx-w--w-

2
Voytrekk sopuli.xyz voytrekk@sopuli.xyz
Joined: 2024-12-23
#23 · Quote Reply

chmod -R 777 / Why the fuck am I still getting permission errors

Selinux

7
alecsargent lemmy.zip alecsargent@lemmy.zip
Joined: 2025-08-13
#24 · Quote Reply

But those are different

Had to be done for the joke. :)

3
palordrolap fedia.io palordrolap@fedia.io
Joined: 2024-08-13
#25 · Quote Reply

chmod -R 600 ~/, because I dont trust anyone, not even myself.

I forgor the tilde and its taking a long time. wat do

12
katy ✨ piefed.blahaj.zone cupcakezealot@piefed.blahaj.zone
Joined: 2025-06-06
#26 · (edited) Quote Reply

chmod -R 777 / galaxy brain

13
vaionko sopuli.xyz vaionko@sopuli.xyz
Joined: 2023-10-15
#27 · Quote Reply

I mean, having config files in there makes a lot of sense. It allows you to move your home to some other machine/install and immediately feel at home, because everything is configured to your liking. Now, the fact that many apps create their own directory instead of putting their stuff in ~/.config is pretty annoying.

Also for multi user systems it's handy that each user gets their own configs

5
the_strange feddit.org the_strange@feddit.org
Joined: 2024-06-22
#28 · Quote Reply

I forgor the tilde and its taking a long time. wat do

sudo rm -rf / --no-preserve-root

Start from scratch

12
SaharaMaleikuhm feddit.org SaharaMaleikuhm@feddit.org
Joined: 2024-07-23
#29 · Quote Reply

Cat doesn't execute anything tho, it just reads and gives output

The cat command executes the cat program.

10
SaharaMaleikuhm feddit.org SaharaMaleikuhm@feddit.org
Joined: 2024-07-23
#30 · Quote Reply

Nope, +x for life

15
PerogiBoi lemmy.ca PerogiBoi@lemmy.ca
Joined: 2023-06-08
#31 · Quote Reply

Chmod 777 I live erratically without consequence.

4
undefinedTruth lemmy.zip undefinedTruth@lemmy.zip
Joined: 2025-09-25
#32 · Quote Reply

chmod 755 for when setting permissions to directories. chmod +x for making something executable right when I am about to run it.

7
Nyadia lemmy.blahaj.zone Nyadia@lemmy.blahaj.zone
Joined: 2025-03-27
#33 · Quote Reply

I don't use chmod nearly often enough to remember these numbers. I know there's a mathematical way to figure it out, but I cba to do that when u+wrx more or less tells me exactly what it does (grant the User Write, Read, and eXecute permissions)

11
𝘋𝘪𝘳𝘬 lemmy.ml Dirk@lemmy.ml
Joined: 2023-06-09
#34 · Quote Reply

Nah, there’s a lot of config files in there that other programs need to read.

The programs usually run in user context and have access to the files.

Even if thinking very hard I cannot come up with a scenario where a program that does not run in user context needs access to user files.

2
quantumvoid0 programming.dev quantumvoid0@programming.dev
Joined: 2026-05-04
#35 · Quote Reply

The cat command executes the cat program.

What happens when u try to cat the cat program, is that considered reading or executing

5
renegadespork lemmy.jelliefrontier.net renegadespork@lemmy.jelliefrontier.net
Joined: 2024-12-03
#36 · Quote Reply

The programs usually run in user context and have access to the files. Even if thinking very hard I cannot come up with a scenario where a program that does not run in user context needs access to user files.

Usually, but there might be services running as other users that reference those configs. It really just depends on what’s on your system. Obviously you can make 700 work, but it might require tweaking some stuff.

1
𝘋𝘪𝘳𝘬 lemmy.ml Dirk@lemmy.ml
Joined: 2023-06-09
#37 · Quote Reply

Usually, but there might be services running as other users that reference those configs. It really just depends on what’s on your system. Obviously you can make 700 work, but it might require tweaking some stuff.

It really just depends on what’s on your system.

Yes, this is what I wonder.

I use Linux since ca. 2005 and never ever had a program not working because it could not read a user’s $HOME contents.

2
Clay_pidgin sh.itjust.works clay_pidgin@sh.itjust.works
Joined: 2023-06-14
#38 · Quote Reply

I forgor the tilde and its taking a long time. wat do

Tilde is a shortcut to /home/palordrolap

2
NominatedNemesis reddthat.com NominatedNemesis@reddthat.com
Joined: 2023-12-18
#39 · (edited) Quote Reply

Cat doesn't execute anything tho, it just reads and gives output

Except if you use kitty terminal emulator with unsecure remote access. Issue

Then with cat, you could execute arbitrary commands...

5
NominatedNemesis reddthat.com NominatedNemesis@reddthat.com
Joined: 2023-12-18
#40 · Quote Reply

What happens when u try to cat the cat program, is that considered reading or executing

Both, they are not mutually exclusive.

5
vala lemmy.dbzer0.com vala@lemmy.dbzer0.com
Joined: 2025-07-24
#41 · Quote Reply

chmod -R -x *

1
BigBrownBeaver lemmy.world BigBrownBeaver@lemmy.world
Joined: 2025-06-16
#42 · Quote Reply

chmod -R ug+rwX,o=r *

7
quarrel4you piefed.social quarrel4you@piefed.social
Joined: 2026-02-26
#43 · Quote Reply

u=rwX,g=rX,o=rX because this won't make every file executable, only folders.

Careful: chmod -X also looks for any existing exec bits:

$ umask 0
$ >foo >bar
$ ls -al foo bar
-rw-rw-rw- 1 user group 0 Sep 10 00:00 bar
-rw-rw-rw- 1 user group 0 Sep 10 00:00 foo
$ chmod o+x foo
$ ls -al foo bar
-rw-rw-rw- 1 user group 0 Sep 10 00:00 bar
-rw-rw-rwx 1 user group 0 Sep 10 00:00 foo
$ chmod u=rwX,g=rX,o=rX foo bar
$ ls -al foo bar
-rw-r--r-- 1 user group 0 Sep 10 00:00 bar
-rwxr-xr-x 1 user group 0 Sep 10 00:00 foo
2
quarrel4you piefed.social quarrel4you@piefed.social
Joined: 2026-02-26
#44 · Quote Reply

When I start fucking with chmod, it happens way too often that what I want to do only works after I executed chmod 777...

You can actually do chmod +777,u+rwx,go-w foo to make the logic easier if you want to force a starting assumption.

3
wheezy lemmy.ml wheezy@lemmy.ml
Joined: 2025-07-02
#45 · Quote Reply

I mean, having config files in there makes a lot of sense. It allows you to move your home to some other machine/install and immediately feel at home, because everything is configured to your liking. Now, the fact that many apps create their own directory instead of putting their stuff in ~/.config is pretty annoying.

Yeah. That's more my frustration. That it's implented poorly by most people. I don't think that trying to change the standard by "adding another standard" would be helpful. Just minor frustration. Which usually leads me to putting all my organized directories and shit in a dedicated location. And I just let /home be the clutter that it is.

5
Drunk & Root sh.itjust.works DrunkAnRoot@sh.itjust.works
Joined: 2025-04-15
#46 · (edited) Quote Reply

real question is how do you pronounce chmod

4
Bakkoda lemmy.world Bakkoda@lemmy.world
Joined: 2024-02-28
#47 · Quote Reply

real question is how do you pronounce chmod

c h mod

10
alecsargent lemmy.zip alecsargent@lemmy.zip
Joined: 2025-08-13
#48 · Quote Reply

real question is how do you pronounce chmod

I pronounce it chmod, you?

1
recursivethinking lemmy.world recursivethinking@lemmy.world
Joined: 2023-06-24
#49 · Quote Reply

real question is how do you pronounce chmod

shmod.
and then cho-wn (ch'own? cho-un?)

and of course, hweel (jk on this one)

5
AstroLightz lemmy.world AstroLightz@lemmy.world
Joined: 2023-06-29
#50 · Quote Reply

real question is how do you pronounce chmod

"c h m o d"

Just like "l s" and "p a c m a n"

2
red_bull_of_juarez lemmy.dbzer0.com red_bull_of_juarez@lemmy.dbzer0.com
Joined: 2025-02-05
#51 · Quote Reply

Careful: chmod -X also looks for any existing exec bits: $ umask 0 $ >foo >bar $ ls -al foo bar -rw-rw-rw- 1 user group 0 Sep 10 00:00 bar -rw-rw-rw- 1 user group 0 Sep 10 00:00 foo $ chmod o+x foo $ ls -al foo bar -rw-rw-rw- 1 user group 0 Sep 10 00:00 bar -rw-rw-rwx 1 user group 0 Sep 10 00:00 foo $ chmod u=rwX,g=rX,o=rX foo bar $ ls -al foo bar -rw-r--r-- 1 user group 0 Sep 10 00:00 ba...

This is exactly what I expect, so I never got tripped up by this. But yes, it's worth pointing out that this will expand the executable flag on files that are already executable and set it on folders too. But not set it on files that aren't executable at all.

1
Post Reply Page 1 of 2   Goto page 1, 2 Last »
Back to top