O'Reilly logo

Advanced UNIX Programming by Warren W. Gay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing Your Root Directory

The UNIX file system has one root directory, on which all other file systems are mounted. It is often desirable to limit the exposure of the entire file system to a smaller portion when dealing with potentially hostile users. This approach is commonly used by ftp(1) servers.

An anonymous ftp(1) server could be established with all of its files and subdirectories in the directory /home/ftp. Additionally, the directory /home/ftp/pub might contain public files for downloading. At startup, the ftp(1) server would change its root directory to the directory /home/ftp. From that point forward, the public directory would be known to the server as /pub instead of /home/ftp/pub. This prevents the client user from accessing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required