Chapter 4. What you need to know about sharing files

On a UNIX system, your files can be shared with other users.

UNIX is a multiuser system, which means you share it with other users. The files that you read or edit on your terminal can also be seen by your coworkers.

Files are stored on a hard disk that is mounted on the UNIX system. If you and a coworker are both using the same system, then the file /departments/writers/meetings/minutes.txt that you see on your terminal can also be accessed on your coworker’s terminal under the same pathname.

This means that on a UNIX system, you don’t have to deal with trading floppy disks to give a file to someone else. You can just tell someone the pathname to the file, and they should be able to find it on the system.

Or at least, that’s the theory. In actuality, there are security measures for preventing people from seeing or editing files that you don’t want them to. There are also complications with more than one person being able to work on the same files: how do you make sure that you aren’t both making changes at the same time?

When sharing files, the sorts of things that you might want to ask your administrator about are:

  • Why can’t I read a file or list a directory?

  • How do I let my coworkers edit my files?

  • I made changes to a file, but now I find out that I can’t write it. Are my changes lost?

  • How can I be sure that no one else is working on this file right now?

This chapter explains the concepts behind sharing files on UNIX and describes how you might deal with these questions in the absence of your system administrator.

Get WYNTK: UNIX System Admininistrator now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.