
chmod -R ug+rwX,o=r *
chmod -R -x *
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)

This is drake erasure and I’m LOVING EVERY MINUTE OF IT, JERRY
Yo dawg, heard you like memes
Nope, +x for life
deleted by creator
chmod 755for when setting permissions to directories.chmod +xfor making something executable right when I am about to run it.chmod -R 777 /galaxy brainchmod -R 600 ~/, because I dont trust anyone, not even myself.I forgor the tilde and its taking a long time. wat do
Tilde is a shortcut to /home/palordrolap
sudo rm -rf / --no-preserve-rootStart from scratch
Chmod 777 I live erratically without consequence.
But those are different
Yeah, not only does
+xleave 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
Except if you use kitty terminal emulator with unsecure remote access. Issue
Then with cat, you could execute arbitrary commands…
The cat command executes the cat program.
What happens when u try to cat the cat program, is that considered reading or executing
Both, they are not mutually exclusive.
chmod 666 so only the devil can execute it
700 cause I’m selfish.
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.
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.
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
$HOMEcontents.
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 footo make the logic easier if you want to force a starting assumption.chmod -R 777 /Why the fuck am I still getting permission errors
sudo
May I interest you in a nice “chown”?
u=rwX,g=rX,o=rX because this won’t make every file executable, only folders.
Careful:
chmod -Xalso 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









