Case: 2005/360 Document and enable visibility of hidden files in pcfs Author: Frank Hofmann Summary: This proposal requests, for Patch binding, * to elevate the interface status of the existing pcfs mount options "hidden"/"nohidden" from "Private" to "Unstable" commitment level. I.e. document this feature. * to change the default behaviour of pcfs so that "-o hidden" (the ability to see files on a FAT filesystem that have the 'hidden' FAT attribute bit set) becomes the default. The Problem The original submission for PSARC 1996/443 contained the pcfs- specific mount options "-o hidden" and "-o nohidden" which enabled users of the pcfs filesystem to see files that have the (non-UNIX, non-POSIX) 'hidden' FAT file attribute set. While the code that was delivered for 1996/443 had support for these options in, they had been withdrawn from the approved part of PSARC 1996/443. The reasons for why "hidden" was withdrawn were: 1. No agreement could be reached regarding the name of the mount option to "make hidden files visible". 2. No agreement could be reached regarding the (impossible) mapping of FAT attributes to the 'generic' POSIX file permission bits, and the (un)necessity for Solaris utilities to switch on/off pcfs-specific file attributes. Lacking this, support for accessing hidden files on pcfs was considered "a hack". 3. No market was seen for allowing access to hidden files. Quote from the mail archive for PSARC 1996/443: Most users can't see hidden files under DOS or Windows anyway; they have to get special tools to change them, tools that are the equivalent of fsdb. This was incorrect even in 1996, so the decision not to productize "hidden"/"nohidden" was based on incorrect facts. This situation has significantly changed eight years later. - It is trivial today (a switch accessible in Windows' Explorer Menus) to see hidden files on a FAT filesystem under Microsoft Windows. That's far from requiring "the equivalent of fsdb". - A mapping between filesystem-specific attributes and POSIX attributes (in full consequence: An extension of the POSIX file attribute set) has not been done. Extended file attributes are still not a POSIX standard, and the generic development in other filesystems on Solaris has made such "fs-specific attributes" into mount options or ioctls (example: ufs' handling of direct I/O). The advice given in PSARC 1996/443 therefore can be considered obsolete. - there's a market: Some Digital Camera and portable music player manufacturers (noticeably Apple's Ipod device) are using FAT filesystems and turn on the 'hidden' bit for ALL files on that device's mass storage. Which means support for reading/writing the data on such devices depends on making their contents visible. See RFE 1181439. The Proposed Solution PCFS will turn on the "hidden" mount option by default, making hidden files visible to the user. This gives the most consistent user experience by not hiding information from the user by default. Disabling the feature is still an option available to the system administrator if so desired. To do that, the system will revert to the current behaviour if the "nohidden" mount option is explicitly used. Reasoning ========= Other alternatives such as having PCFS rename files with the "hidden" PCFS attribute set to the UNIX-style ".hiddenfile" (i.e prepend a filename with '.' to make it invisible in a 'ls' without '-l' option) were discussed but this causes ambiguities as well as failure of existing applications that expect to see files with a given name, a "hidden" attribute notwithstanding. A real-world example application that behaves like this is the UNIX program "gtkpod" that allows access to Apple iPod music players. Likewise, just documenting the existance of "hidden"/"nohidden" mount options but not changing the default behaviour causes bad user experience, because access to such files will need explicit operator intervention, which again makes existing applications fail which just expect to see such files. The example for this is again "gtkpod". Retaining and documenting the current "hidden"/"nohidden" mount options but making "hidden" (show hidden files) the default behaviour has the advantages: 1. No surprise to users/admins who found out about the undocumented options via Usenet, Solaris headers or www.opensolaris.org sourcecode. 2. No surprise to applications written for Linux, *BSD or MacOSX, which do not perform any "name translation" for hidden files. Such applications just work. 3. By far the best cost/benefit ratio of all options. Note on "system" files ====================== The (also non-POSIX) "system" PCFS file attribute has no bearing in this case - "system" does not imply "hidden". This case does not attempt to define/modify PCFS's behaviour wrt. to files having the "system" attribute being set/unset. MAN PAGE CHANGES The man page for mount_pcfs(1M) will be changed to include usage instructions on the "hidden"/"nohidden" mount options. It will also be changed to state that "hidden" is the new default behaviour. The man page for pcfs(7FS) describes the current behaviour (hidden files not being shown) under "BUGS". That section will be removed. An example on how to use the "nohidden" mount option will be added to the Examples section of rmmount.conf(4). Manpage diffs are available.