Permission

Sections

Introduction

By setting up permission properly for each data handled by the application, you can share data and/or allow other application only to read data.

There is no plan to provide a mechanism to share the ROM data of an application; permission features are put to use for the following data.

WFS is used to handle data mentioned above. The WFS permission specification should be described below.

NOTE:
Because data on the SD card uses FAT, advanced settings such as granting access depending on the application are not available. The guideline, rather than the system, ensures protection of data against other applications.
NOTE:
The application cannot use the FS library to access BOSS data; instead, it can access via the BOSS library. See the BOSS documentation for information on how BOSS data access works.

Category

There are 3 types of categories: "Owner", "Group", and "Other" to switch the WFS permission. Two types of IDs: OwnerID and GroupID are used to identify the categories. The length is 64-bit and 20-bit (*1) respectively; only one of each can be specified per entry (file, directory).

In case of save data, the TitleID of the application that has created the root directory, directory, and file is set as OwnerID and GroupID as GroupID automatically. In case of add-on content, GroupID is set as GroupID automatically as well but OwnerID is set to zero.

IDs can be set up by the Wii U Application Configuration Tool. However, you cannot set up/change OwnerID and GroupID for an entry within the application or obtain a value to compare with its own ID.

*1: GroupID is kept 32-bit-long within the system; 20 bits of which is what the application needs to care about. It can be set up by the Wii U Application Configuration Tool.

Permission Type

There are 3 permission types: Read (r), Write (w), and Execute (x). The default for each data and category is as shown below.

Owner Group Other
Save Data rw- rw- ---
Add-on Content --- r-- ---

The application receives a result according to permission via FS APIs. For example, an attempt to open a read-only file as a writable one should result in FS_STATUS_PERMISSION_ERROR.

WARNING:
WFS mechanism does not guarantee that permission has more power in the order of Owner, Group, and Other. Depending on the library specification and application settings, for example, Owner may not have the permission available for Group.

FAT (SD card access) and PCFS support only simple settings for all entries as follows:

Owner Group Other
FAT, PCFS r-- r-- r--
rw- rw- rw-

Permission Change

Currently, the application can change permission using the following:

Revision History

2013/06/28 Updated description about add-on content. Replaced the term "added contents" to "add-on content".
2013/05/08 Automated cleanup pass.
2012/11/20 Replaced "FAT32" to "FAT".
2012/09/12 Modified description in Permission Type section.
2012/09/11 Initial version.


CONFIDENTIAL