this post was submitted on 21 Nov 2023
689 points (97.6% liked)

Linux

48008 readers
1681 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 11 months ago (5 children)

Yup. Took me weeks to figure out why I explicitly need to use sudo nvim for my nginx config on my Pi, while on my server my little helper script could automatically use sudo for me. Turns out, I chmoded the sites-available and sites-enabled on my pi to 644 but left them untouched on my server.

I still don't know what numbers would be 644 but with execute permissions, but in the end, idc.

[–] [email protected] 6 points 11 months ago* (last edited 11 months ago) (1 children)

For those that don't know, you can use three numbers, zero through eight, with the chmod command. it takes the binary of each digit to set the permissions.

$ chmod 644
 6  |  4  |  4
110 | 100 | 100
rw- | r-- | r--
load more comments (1 replies)
[–] [email protected] 6 points 11 months ago

644 and 755 are the two most useful octal codes to remember because they make up the majority of files on your system. 644 is user read/write but read-only for everyone else. 755 adds execute to that, useful for scripts and directories.

Other than that, the most common other things are setting access for group and others to zero, so your ~/.ssh directory is 700 (rwx for you, no access for anyone else) and the private keys in it are 600, rw for you, no access for anyone else).

[–] [email protected] 4 points 11 months ago

Execute just adds 1, so if you want the dir world viewable, it's 755.

load more comments (2 replies)
[–] [email protected] 9 points 11 months ago (5 children)
[–] [email protected] 6 points 11 months ago (1 children)

Why ask for help if I can spend hours in "terminal flow" where I know every three character sequence for CTLR+R to suggest the last 10 commands in the history?

load more comments (1 replies)
load more comments (4 replies)
[–] [email protected] 7 points 11 months ago (1 children)

The EPERM didn't give you a little hint?

[–] [email protected] 5 points 11 months ago (1 children)
[–] [email protected] 10 points 11 months ago
[–] [email protected] 7 points 11 months ago

I still waste time on this occasionally 😹

[–] [email protected] 6 points 11 months ago

That's how it works

load more comments
view more: ‹ prev next ›