Mac OS X Server 10.2 and later: How to change default file permissions for the FTP service

When you upload a file over FTP, the resulting file includes the default UNIX permissions as if you created the file on your desktop. In a group work environment, this can prevent others from modifying the file. If you want to implement more useful permissions, edit the server's "ftpaccess" configuration file.

  1. Open the file /Library/FTPServer/Configuration/ftpaccess in a text editor. (See "How to Locate and Edit Configuration Files" for more information.)
  2. Type the following line at the end of the file:

    defumask <umask>

    Where <umask> is an actual umask value, such as 002 (see "About umask values," below).
  3. Save the file.
  4. Restart the FTP service.

About umask values

Generally speaking, a umask value is subtracted from the highest permission value possible on the host system. Permission values range from 000 to 777, which is an abbreviated way of notating owner/group/other access levels of rwxrwxrwx (find more information here). A 0 (zero) means no access, while other numbers are the sum of 1, 2, and 4, where 4=Read, 2=Write, and 1=Execute.

A permission that's commonly desirable is 775, in which the owner and group have full access and unknown users have read-execute access. Because the umask value is subtracted from the most permissive value (usually 777), a umask of 002 yields an effective permission of 775.

This explanation is somewhat simplified. If you are not comfortable with altering permissions, consult someone who is, check out some Internet resources, or find information at your local bookstore before proceeding.

Tip: For a full explanation of the defumask directive, type man ftpaccess in Terminal to view the manual.

Published Date: Oct 11, 2016