Keeping your files private from anyone but those with superuser (root) access is easy on Linux. File permissions provide everything you need. By default, you'll have a username and primary group assigned to your account, and you can use the chmod (change mode) command to control what anyone else can view or change.\n(If permissions like "750" and "rwxr-x---" don't ring any bells for you, check out these posts for insights into how file permissions work on Linux:\u00a0A deeper dive into Linux permissions and\u00a0Unix: beyond group and everyone else)\nAny time you request a long file listing with the ls -l command, you'll see lines like this:\n-rw-r-----. 1 myacct admins 2088 Jun 26 recipe\nThe permissions should be fairly obvious, but this little diagram identifies how the permissions relate to various users:\n-rw-r-----\n^^ ^ ^\n|| | |\n|| | +-- everyone else has no access\n|| +----- other members of the admins group can read\n|+-------- you have read and write access\n+--------- file type ("-" identifies a regular file)\n\nNote that if you were to set permissions on a file to 044 (---r--r--), you would not be able to view the file even though you're clearly a member of the group.\n$ ls -l dumfile\n----r--r--. 1 myacct amins 9 Jun 13 10:41 dumfile\n$ cat dumfile\ncat: dumfile: Permission denied\n\nYou could, of course, change the permissions back to something more reasonable.\nIf you see a + sign at the end of the permissions string (e.g., -rw-r-----+), that means that other users beyond those included in the owner, group and other groups also have access to the file. The getfacl command can be used to provide the details. In the example below, John Doe has read and write access in spite of the fact that he is not a member of the admins group.\n$ getfacl recipe\n# file: recipe\n# owner: myacct\n# group: admins\nuser::rw-\nuser:johndoe:rw-\ngroup::r--\nmask::rw-\nother::---\n\nFiles can be easily shared with members of your primary group and even with anyone with an account on the system, though this will require that they have access to the file location as well as the files themselves. A file like the one listed below will be readable by anyone in the tech team (since they will have read access), but they will not be able to make any changes.\n$ ls -l meeting_notes\n-rwxr-----. 1 myacct techteam 2534 Jun 11 meeting_notes\n\nNote that it's probably best to store files to be shared with others in a directory other than your home directory.\nCompressing files\nLinux provides a number of commands for compressing files -- a good thing to do when files are fairly large and don't need to be viewed or modified very often. The shrinkage will depend on file content. Here's an example:\n$ ls -l dict.mp4\n-rw-r--r--. 1 shs shs 11215553 Mar 14 15:07 dict.mp4\n$ gzip dict.mp4\n$ ls -l dict*\n-rw-r--r--. 1 shs shs 8507802 Mar 14 15:07 dict.mp4.gz\n\nThe link below will take you to a post on compressing files.\nHow to compress files on Linux 5 ways\nPassword-protecting files\nOne very simple way to encrypt a file on Linux by adding a -x option to your vi or vim commands. This is a very easy way to keep the contents private without depending on file permissions \u2013 even from root. To create a passcode-protected file, use a command like this:\n$ vim -x newfile\nYou will be asked twice to enter the encryption key. When you go to edit the file again using a command like "vim newfile", you will asked to enter the same key again. This command provides a very easy way to hide the contents of a text file without having to rely on file permissions.\nMore on encrypting files with vim (including how to reverse the process) is available at this link:\nUsing vim to quickly encrypt and decrypt files\nWrap-up\nLinux commands make it possible to share files with everyone on the system, so be very selective about who can view them or hide their contents from everyone but yourself.