126
/media or /mnt or anywhere ? Discussion.
(lemmy.today)
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.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
chmod
is the command to change user permissions. The numbers mean user, group, and others and the value allows read, write, execute. So, 000 means no one has permissions to get rid of the mount point. 777 means everyone has all permissions. (4 is read, 2 is write, and 1 is execute and the numbers are added. So, 644 would mean you can read/write, the group and other users have read only access.)You don’t have to use the numbers but eventually, almost every Linux admin does because it’s faster, a bit like a keyboard shortcut. But, for instance, you can add Execute permission with
chmod +x /some/file/location
.Here’s more details on the how to chmod and the historic reasons for the 0-7 system (spoiler: it’s 8 bits): https://www.redhat.com/sysadmin/linux-file-permissions-explained
Thank You for the detailed answer.
chmod vs chwon ?
chown
changes the file owner.chmod
changes permissions. So, if a file or directory is owned by root but a user should have access, you could make them the owner or you could keep root the owner and just allow read/write access.They come up more on servers where you often have multiple users with different access levels. Some users might not have
sudo
permission but do have full control over their home directory and whatever else they need. And web servers, for instance, will usually have a user calledwww-data
or similar and it’s shared by all the users in the “developer” group.Thanks.