Unix Notes

FTP Permissions in 10.2

For some reason in Mac OS X 10.2, the default file permissions when uploading files via ftp is set to 640. This results in the permission “-rw-r—–“. That is, the file can be read and modified by the owner, read by those belonging to its group, but others can’t even read it. Naturally, this causes problems when using ftp to upload files to a web server.

In previous systems it defaulted to the more sensible 644, or “-rw-r–r–“, which is also the system-wide default. Apparently, ftpd does not follow the system’s UMASK setting. To change this for all users on the machine you need to create a file in /etc/ called ftpd.conf. In this file, add one line saying:

umask all 022

Save the file and restart the ftp server. This will make uploaded files readable by all.

4 replies on “FTP Permissions in 10.2”

THANK YOU! I’m a HS teacher and I’d been banging my head against the blackboard with this problem until I found your tip. My students are learning to build web pages on their laptops using Dreamweaver, and I’d set up one of the G4s in the classroom to be the classroom web server.Until I applied this fix, they couldn’t browse to their pages unless I went in and manually changed permissions.

All well and good, but where exactly does OS X store ftpd? You can’t just type “ftpd reload”… and no-one can tell you where it’s stored or how to find it! Agh, frustrations… ~_~

Thanks for the helpful tip though!