Index: appfsd.tcl
==================================================================
--- appfsd.tcl
+++ appfsd.tcl
@@ -807,10 +807,14 @@
 
 						::appfs::db eval {SELECT type, time, source, size, perms FROM files WHERE package_sha1 = $pathinfo(package_sha1) AND file_directory = $directory AND file_name = $file;} retval {}
 
 						# Allow an administrator to supply additional permissions to remote files
 						if {[info exists retval(perms)]} {
+							# Lower case this in case an upper-cased value was put in
+							# the database before we started lowercasing them
+							set retval(perms) [string tolower $retval(perms)]
+
 							set retval(perms) [::appfs::user::change_perms $path $retval(perms)]
 						}
 
 						if {[info exists retval(type)] && $retval(type) == "directory"} {
 							set retval(childcount) [llength [getchildren $path]]