- Directory permission is 777, uid is root groupid is priv_externalstorage
- security-manager will handle access control for external storage
- When externalstorage privilege is configured as privacy,
security framework will enforce this privilege with different mechanism - per-application mount namespace.
In such case mount options must be different to allow all users and groups access to mount point.
If an application is not supposed to have access to externalstorage,
security-manager will mount a special directory over sdcard mount point.
In such case access control is no longer based on GID,
so mount options must allow application access regardless of its groups.
Change-Id: I1582d3afd70354cc81d7142fee4c9edf4c94ef30
Signed-off-by: pr.jung <pr.jung@samsung.com>
MOUNT_DIRECTORY=$1
find $MOUNT_DIRECTORY -type d | xargs chsmack -a '*' -t
find $MOUNT_DIRECTORY -type f | xargs chsmack -a '*'
-find $MOUNT_DIRECTORY -type d | xargs chmod 770
+find $MOUNT_DIRECTORY -type d | xargs chmod 777
find $MOUNT_DIRECTORY -type f | xargs chmod 660
find $MOUNT_DIRECTORY -type d | xargs chown root:priv_externalstorage
find $MOUNT_DIRECTORY -type f | xargs chown root:priv_externalstorage
#define FS_VFAT_NAME "mkdosfs"
/* guid 10001 - group priv_externalstorage */
-#define FS_VFAT_MOUNT_OPT "uid=0,gid=10001,dmask=0007,fmask=0117,iocharset=iso8859-1,utf8,shortname=mixed"
+#define FS_VFAT_MOUNT_OPT "uid=0,gid=10001,dmask=0000,fmask=0117,iocharset=iso8859-1,utf8,shortname=mixed"
static const char *vfat_arg[] = {
"/usr/bin/newfs_msdos",